MCPcopy Create free account
hub / github.com/LUX-Core/lux / VerifyMessage

Method VerifyMessage

src/darksend.cpp:2026–2041  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2024}
2025
2026bool CDarkSendSigner::VerifyMessage(CPubKey pubkey, vector<unsigned char>& vchSig, std::string strMessage, std::string& errorMessage) {
2027 CHashWriter ss(SER_GETHASH, 0);
2028 ss << strMessageMagic;
2029 ss << strMessage;
2030
2031 CPubKey pubkey2;
2032 if (!pubkey2.RecoverCompact(ss.GetHash(), vchSig)) {
2033 errorMessage = _("Error recovering public key.");
2034 return false;
2035 }
2036
2037 if (fDebug && pubkey2.GetID() != pubkey.GetID())
2038 LogPrintf("CDarkSendSigner::VerifyMessage -- keys don't match: %s %s", pubkey2.GetID().ToString(), pubkey.GetID().ToString());
2039
2040 return (pubkey2.GetID() == pubkey.GetID());
2041}
2042
2043bool CDarksendQueue::Sign() {
2044 if (!fMasterNode) return false;

Callers 12

SignatureValidMethod · 0.45
SignMethod · 0.45
CheckSignatureMethod · 0.45
SignMethod · 0.45
DseepMethod · 0.45
RegisterMethod · 0.45
CheckMethod · 0.45
SignMethod · 0.45
CheckSignatureMethod · 0.45
ProcessMasternodeFunction · 0.45
CheckSignatureMethod · 0.45
SignMethod · 0.45

Calls 5

_Function · 0.85
RecoverCompactMethod · 0.80
GetHashMethod · 0.45
GetIDMethod · 0.45
ToStringMethod · 0.45

Tested by

no test coverage detected