reduce the number of message

Signed-off-by: Leo Chen <leo@harmony.one>
pull/498/head
Leo Chen 6 years ago
parent 1b96ebcdee
commit e92fdc7b33
  1. 4
      consensus/consensus.go

@ -258,7 +258,7 @@ func (consensus *Consensus) checkConsensusMessage(message *msg_pb.Message, publi
consensusID := consensusMsg.ConsensusId consensusID := consensusMsg.ConsensusId
blockHash := consensusMsg.BlockHash blockHash := consensusMsg.BlockHash
utils.GetLogInstance().Warn("checkConsensusMessage", "publicKey", publicKey) utils.GetLogInstance().Warn("checkConsensusMessage", "consensusID", consensusID, "blockHash", blockHash)
// Verify message signature // Verify message signature
err := verifyMessageSig(publicKey, message) err := verifyMessageSig(publicKey, message)
if err != nil { if err != nil {
@ -309,7 +309,7 @@ func verifyMessageSig(signerPubKey *bls.PublicKey, message *msg_pb.Message) erro
return err return err
} }
msgHash := sha256.Sum256(messageBytes) msgHash := sha256.Sum256(messageBytes)
utils.GetLogInstance().Debug("verifyMessageSig", "signerPubKey", signerPubKey, "msgHash", msgHash) utils.GetLogInstance().Debug("verifyMessageSig")
if !msgSig.VerifyHash(signerPubKey, msgHash[:]) { if !msgSig.VerifyHash(signerPubKey, msgHash[:]) {
return errors.New("failed to verify the signature") return errors.New("failed to verify the signature")
} }

Loading…
Cancel
Save