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

Method getBlock

protocols/cpc/fetcher/fetcher_test.go:93–98  ·  view source on GitHub ↗

getBlock retrieves a block from the tester's block chain.

(hash common.Hash)

Source from the content-addressed store, hash-verified

91
92// getBlock retrieves a block from the tester's block chain.
93func (f *fetcherTester) getBlock(hash common.Hash) *types.Block {
94 f.lock.RLock()
95 defer f.lock.RUnlock()
96
97 return f.blocks[hash]
98}
99
100// verifyHeader is a nop placeholder for the block header verification.
101func (f *fetcherTester) verifyHeader(header *types.Header, refHeader *types.Header) error {

Callers 3

loopMethod · 0.45
insertMethod · 0.45
TestPendingDeduplicationFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected