|
|
@ -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 |
|
|
|
} |
|
|
|
} |
|
|
|