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 Jul 5, 2022
1 parent f6ac80c commit 87bb5db
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 87bb5db

Please sign in to comment.