Skip to content

Commit

Permalink
core: allow external processor (ethereum#25233)
Browse files Browse the repository at this point in the history
  • Loading branch information
MariusVanDerWijden authored and blakehhuynh committed Oct 7, 2022
1 parent 8da333f commit 2dfbd82
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions core/blockchain.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

0 comments on commit 2dfbd82

Please sign in to comment.