diff options
author | Jimmy Hu <jimmy.hu@dexon.org> | 2019-04-13 23:07:46 +0800 |
---|---|---|
committer | Jimmy Hu <jimmy.hu@dexon.org> | 2019-04-13 23:07:46 +0800 |
commit | 2d26246247e2f7e616cc3d13b9d61308580e7d67 (patch) | |
tree | ed6de7cf9b413ba352794d49c3d07dbf7a61e5cd | |
parent | 24c0cecbbf7ba84754ccc02d37c9540ce317976c (diff) | |
download | dexon-consensus-2d26246247e2f7e616cc3d13b9d61308580e7d67.tar dexon-consensus-2d26246247e2f7e616cc3d13b9d61308580e7d67.tar.gz dexon-consensus-2d26246247e2f7e616cc3d13b9d61308580e7d67.tar.bz2 dexon-consensus-2d26246247e2f7e616cc3d13b9d61308580e7d67.tar.lz dexon-consensus-2d26246247e2f7e616cc3d13b9d61308580e7d67.tar.xz dexon-consensus-2d26246247e2f7e616cc3d13b9d61308580e7d67.tar.zst dexon-consensus-2d26246247e2f7e616cc3d13b9d61308580e7d67.zip |
core: add log to verify psig
-rw-r--r-- | core/consensus.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/core/consensus.go b/core/consensus.go index ec15bf3..968b90e 100644 --- a/core/consensus.go +++ b/core/consensus.go @@ -93,13 +93,23 @@ func (recv *consensusBAReceiver) VerifyPartialSignature(vote *types.Vote) bool { if vote.Position.Round >= DKGDelayRound && vote.BlockHash != types.SkipBlockHash { if vote.Type == types.VoteCom || vote.Type == types.VoteFastCom { if recv.npks == nil { + recv.consensus.logger.Debug( + "Unable to verify psig, npks is nil", + "vote", vote) return false } if vote.Position.Round != recv.npks.Round { + recv.consensus.logger.Debug( + "Unable to verify psig, round of npks mismatch", + "vote", vote, + "npksRound", recv.npks.Round) return false } pubKey, exist := recv.npks.PublicKeys[vote.ProposerID] if !exist { + recv.consensus.logger.Debug( + "Unable to verify psig, proposer is not qualified", + "vote", vote) return false } blockHash := vote.BlockHash |