use error.Is to check for nondeterminstic vote error type (#6237) (#6239)

(cherry picked from commit bf8cce83db)

Co-authored-by: Callum Waters <cmwaters19@gmail.com>
This commit is contained in:
mergify[bot]
2021-03-15 11:20:33 +01:00
committed by GitHub
parent 11523b1302
commit d004a584f8

View File

@@ -1958,7 +1958,7 @@ func (cs *State) tryAddVote(vote *types.Vote, peerID p2p.ID) (bool, error) {
)
return added, err
} else if err == types.ErrVoteNonDeterministicSignature {
} else if errors.Is(err, types.ErrVoteNonDeterministicSignature) {
cs.Logger.Debug("vote has non-deterministic signature", "err", err)
} else {
// Either