MCPcopy Index your code
hub / github.com/CovenantSQL/CovenantSQL / bpGetBlockByHeight

Function bpGetBlockByHeight

api/blocks.go:57–63  ·  view source on GitHub ↗
(ctx context.Context, conn *jsonrpc2.Conn, req *jsonrpc2.Request)

Source from the content-addressed store, hash-verified

55}
56
57func bpGetBlockByHeight(ctx context.Context, conn *jsonrpc2.Conn, req *jsonrpc2.Request) (
58 result interface{}, err error,
59) {
60 params := ctx.Value("_params").(*bpGetBlockByHeightParams)
61 model := models.BlocksModel{}
62 return model.GetBlockByHeight(params.Height)
63}
64
65type bpGetBlockByHashParams struct {
66 Hash string `json:"hash"`

Callers

nothing calls this directly

Calls 2

GetBlockByHeightMethod · 0.95
ValueMethod · 0.80

Tested by

no test coverage detected