fix redundant var

pull/2593/head
Rongjian Lan 5 years ago
parent eb54d32e2c
commit 0d07861c68
  1. 4
      consensus/double_sign.go

@ -105,13 +105,13 @@ func (consensus *Consensus) checkDoubleSign(recvMsg *FBFTMessage) {
func (consensus *Consensus) couldThisBeADoubleSigner( func (consensus *Consensus) couldThisBeADoubleSigner(
recvMsg *FBFTMessage, recvMsg *FBFTMessage,
) bool { ) bool {
num, hash, now := consensus.blockNum, recvMsg.BlockHash, consensus.blockNum num, hash := consensus.blockNum, recvMsg.BlockHash
suspicious := !consensus.FBFTLog.HasMatchingAnnounce(num, hash) || suspicious := !consensus.FBFTLog.HasMatchingAnnounce(num, hash) ||
!consensus.FBFTLog.HasMatchingPrepared(num, hash) !consensus.FBFTLog.HasMatchingPrepared(num, hash)
if suspicious { if suspicious {
consensus.getLogger().Debug(). consensus.getLogger().Debug().
Str("message", recvMsg.String()). Str("message", recvMsg.String()).
Uint64("block-on-consensus", now). Uint64("block-on-consensus", num).
Msg("possible double signer") Msg("possible double signer")
return true return true
} }

Loading…
Cancel
Save