MCPcopy Create free account
hub / github.com/CPChain/chain / GetBlock

Method GetBlock

protocols/cpc/api_backend.go:112–114  ·  view source on GitHub ↗
(ctx context.Context, hash common.Hash)

Source from the content-addressed store, hash-verified

110}
111
112func (b *APIBackend) GetBlock(ctx context.Context, hash common.Hash) (*types.Block, error) {
113 return b.cpc.blockchain.GetBlockByHash(hash), nil
114}
115
116func (b *APIBackend) GetReceipts(ctx context.Context, hash common.Hash) (types.Receipts, error) {
117 if number := rawdb.ReadHeaderNumber(b.cpc.chainDb, hash); number != nil {

Callers

nothing calls this directly

Calls 1

GetBlockByHashMethod · 0.65

Tested by

no test coverage detected