Skip to content

Commit

Permalink
Merge PIVX-Project#1438: [Trivial] Remove spammy log in CheckSignature
Browse files Browse the repository at this point in the history
e2c3e77 [Trivial] Remove spammy log in CheckSignature (random-zebra)

Pull request description:

  Remove extra logs in `CSignedMessage::CheckSignature`.
  This method is inherited by all classes extending `CSignedMessage` and its log does not give useful information to the verifier at all (it's not even clear what is the class in question). Might just be of some help when signing (`VerifyHash` is called from within `CSignedMessage::Sign` too).
  All relevant logs for verifiers are already provided by the caller - e.g.
  ```cpp
  if (!mess.CheckSignature()) { /* log something */ }
  ```

ACKs for top commit:
  furszy:
    utACK e2c3e77.
  Fuzzbawls:
    utACK e2c3e77

Tree-SHA512: cf7e24aed86f26f6895289ebc07ece268864836f954372db4834e94f7aac9192bd97d6dec6269efe9c3ee6ce601a8fabd2fc98b29c91e6230bfb9d0386d06727
  • Loading branch information
random-zebra authored and akshaynexus committed Mar 30, 2020
1 parent 63ded21 commit 06fd735
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions src/messagesigner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -128,16 +128,11 @@ bool CSignedMessage::CheckSignature(const CPubKey& pubKey) const

if (nMessVersion == MessageVersion::MESS_VER_HASH) {
uint256 hash = GetSignatureHash();
if(!CHashSigner::VerifyHash(hash, pubKey, vchSig, strError))
return error("%s : VerifyHash failed: %s", __func__, strError);

} else {
std::string strMessage = GetStrMessage();
if(!CMessageSigner::VerifyMessage(pubKey, vchSig, strMessage, strError))
return error("%s : VerifyMessage failed: %s", __func__, strError);
return CHashSigner::VerifyHash(hash, pubKey, vchSig, strError);
}

return true;
std::string strMessage = GetStrMessage();
return CMessageSigner::VerifyMessage(pubKey, vchSig, strMessage, strError);
}

bool CSignedMessage::CheckSignature() const
Expand Down

0 comments on commit 06fd735

Please sign in to comment.