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

Method CheckSignature

src/masternode.cpp:691–703  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

689}
690
691bool CMasternodePayments::CheckSignature(CMasternodePaymentWinner& winner) {
692 //note: need to investigate why this is failing
693 std::string strMessage = winner.vin.ToString().c_str() + boost::lexical_cast<std::string>(winner.nBlockHeight) + winner.payee.ToString();
694 std::string strPubKey = strMainPubKey;
695 CPubKey pubkey(ParseHex(strPubKey));
696
697 std::string errorMessage = "";
698 if (!darkSendSigner.VerifyMessage(pubkey, winner.vchSig, strMessage, errorMessage)) {
699 return false;
700 }
701
702 return true;
703}
704
705bool CMasternodePayments::Sign(CMasternodePaymentWinner& winner) {
706 std::string strMessage = winner.vin.ToString().c_str() + boost::lexical_cast<std::string>(winner.nBlockHeight) + winner.payee.ToString();

Callers 1

ProcessMasternodeFunction · 0.45

Calls 3

ParseHexFunction · 0.85
ToStringMethod · 0.45
VerifyMessageMethod · 0.45

Tested by

no test coverage detected