Skip to content

Commit

Permalink
Adds MustGetMetaData
Browse files Browse the repository at this point in the history
  • Loading branch information
tjayrush committed Sep 13, 2024
1 parent 69d2f7c commit 79b2de1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# TrueBlocks SDKs

[![Go Reference](https://pkg.go.dev/badge/github.com/TrueBlocks/trueblocks-sdk/v3.svg)](https://pkg.go.dev/github.com/TrueBlocks/trueblocks-sdk/v3)

## Table of Contents

- [TrueBlocks SDKs](#trueblocks-sdks)
Expand Down
5 changes: 5 additions & 0 deletions meta.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ func GetMetaData(chain string) (*types.MetaData, error) {
return meta, err
}

func MustGetMetaData(chain string) *types.MetaData {
meta, _ := GetMetaData(chain)
return meta
}

func GetLatestBlock(chain string) base.Blknum {
meta, _ := GetMetaData(chain)
return meta.Latest
Expand Down

0 comments on commit 79b2de1

Please sign in to comment.