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

This commit is contained in:
Callum Waters
2021-03-15 11:02:54 +01:00
committed by GitHub
parent 799f87b55b
commit bf8cce83db

View File

@@ -1966,7 +1966,7 @@ func (cs *State) tryAddVote(vote *types.Vote, peerID p2p.NodeID) (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