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

Function NewBlockValidator

core/block_validator.go:39–46  ·  view source on GitHub ↗

NewBlockValidator returns a new block validator which is safe for re-use

(config *configs.ChainConfig, blockchain *BlockChain, engine consensus.Engine)

Source from the content-addressed store, hash-verified

37
38// NewBlockValidator returns a new block validator which is safe for re-use
39func NewBlockValidator(config *configs.ChainConfig, blockchain *BlockChain, engine consensus.Engine) *BlockValidator {
40 validator := &BlockValidator{
41 config: config,
42 engine: engine,
43 bc: blockchain,
44 }
45 return validator
46}
47
48// ValidateBody validates the header's transaction root.
49// The headers are assumed to be already validated at this point.

Callers 1

NewBlockChainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected