This commit is contained in:
Callum Waters
2022-08-18 10:11:41 +02:00
parent 294468d037
commit 2b8d3956ad
+4 -3
View File
@@ -464,8 +464,9 @@ func (evpool *Pool) processConsensusBuffer(state sm.State) {
// Check the height of the conflicting votes and fetch the corresponding time and validator set
// to produce the valid evidence
var (
dve *types.DuplicateVoteEvidence
err error
dve *types.DuplicateVoteEvidence
valSet *types.ValidatorSet
err error
)
switch {
case voteSet.VoteA.Height == state.LastBlockHeight:
@@ -477,7 +478,7 @@ func (evpool *Pool) processConsensusBuffer(state sm.State) {
)
case voteSet.VoteA.Height < state.LastBlockHeight:
valSet, err := evpool.stateDB.LoadValidators(voteSet.VoteA.Height)
valSet, err = evpool.stateDB.LoadValidators(voteSet.VoteA.Height)
if err != nil {
evpool.logger.Error("failed to load validator set for conflicting votes", "height",
voteSet.VoteA.Height, "err", err,