MCPcopy Create free account
hub / github.com/DNAProject/DNA / curBlockHeight

Function curBlockHeight

cmd/info_cmd.go:161–169  ·  view source on GitHub ↗
(ctx *cli.Context)

Source from the content-addressed store, hash-verified

159}
160
161func curBlockHeight(ctx *cli.Context) error {
162 SetRpcPort(ctx)
163 count, err := utils.GetBlockCount()
164 if err != nil {
165 return err
166 }
167 PrintInfoMsg("CurrentBlockHeight:%d", count-1)
168 return nil
169}
170
171func showTx(ctx *cli.Context) error {
172 SetRpcPort(ctx)

Callers

nothing calls this directly

Calls 3

GetBlockCountFunction · 0.92
SetRpcPortFunction · 0.85
PrintInfoMsgFunction · 0.85

Tested by

no test coverage detected