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

Method InsertHeaderChain

protocols/cpc/syncer/syncer.go:170–170  ·  view source on GitHub ↗

InsertHeaderChain attempts to insert the given header chain in to the local chain, possibly creating a reorg. If an error is returned, it will return the index number of the failing header as well an error describing what went wrong.

(chain []*types.Header, checkFreq int)

Source from the content-addressed store, hash-verified

168 // chain, possibly creating a reorg. If an error is returned, it will return the
169 // index number of the failing header as well an error describing what went wrong.
170 InsertHeaderChain(chain []*types.Header, checkFreq int) (int, error)
171
172 // State returns a new mutable state(public) based on the current HEAD block.
173 // just for test.

Callers 2

InsertHeaderChainMethod · 0.65
blocksHandlerMethod · 0.65

Implementers 1

BlockChaincore/blockchain.go

Calls

no outgoing calls

Tested by

no test coverage detected