Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

core: allow external code to set the validator #25119

Merged
merged 7 commits into from
Jul 4, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
core: rename method
MariusVanDerWijden committed Jul 4, 2022

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit 20c76c7004a8aae5ebeab256667af544ac3dc4b3
4 changes: 2 additions & 2 deletions core/blockchain.go
Original file line number Diff line number Diff line change
@@ -2375,9 +2375,9 @@ func (bc *BlockChain) InsertHeaderChain(chain []*types.Header, checkFreq int) (i
return 0, err
}

// SetValidator sets the current validator.
// SetBlockValidatorForTesting sets the current validator.
// 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) SetValidator(v Validator) {
func (bc *BlockChain) SetBlockValidatorForTesting(v Validator) {
bc.validator = v
}