NewBlockValidator returns a new block validator which is safe for re-use
(config *configs.ChainConfig, blockchain *BlockChain, engine consensus.Engine)
| 37 | |
| 38 | // NewBlockValidator returns a new block validator which is safe for re-use |
| 39 | func 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. |