core: allow external processor (#25233)

This commit is contained in:
Marius van der Wijden 2022-07-05 09:02:49 +02:00 committed by GitHub
parent f6ac80c507
commit 87bb5db675
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -2375,9 +2375,10 @@ func (bc *BlockChain) InsertHeaderChain(chain []*types.Header, checkFreq int) (i
return 0, err
}
// SetBlockValidatorForTesting sets the current validator.
// SetBlockValidatorAndProcessorForTesting sets the current validator and processor.
// This method can be used to force an invalid blockchain to be verified for tests.
// This method is unsafe and should only be used before block import starts.
func (bc *BlockChain) SetBlockValidatorForTesting(v Validator) {
func (bc *BlockChain) SetBlockValidatorAndProcessorForTesting(v Validator, p Processor) {
bc.validator = v
bc.processor = p
}