From 61c39bad9267be5858f90e97c6dc840e9f22e839 Mon Sep 17 00:00:00 2001 From: Marius van der Wijden Date: Mon, 4 Jul 2022 17:30:39 +0200 Subject: [PATCH] core: allow external processor --- core/blockchain.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/core/blockchain.go b/core/blockchain.go index 352871390712..5a4ae9e10fe2 100644 --- a/core/blockchain.go +++ b/core/blockchain.go @@ -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 }