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

Method CheckSignature

src/alert.cpp:169–179  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

167}
168
169bool CAlert::CheckSignature(const std::vector<unsigned char>& alertKey) const
170{
171 CPubKey key(alertKey);
172 if (!key.VerifyECDSA(Hash(vchMsg.begin(), vchMsg.end()), vchSig))
173 return error("CAlert::CheckSignature() : verify signature failed");
174
175 // Now unserialize the data
176 CDataStream sMsg(vchMsg, SER_NETWORK, PROTOCOL_VERSION);
177 sMsg >> *(CUnsignedAlert*)this;
178 return true;
179}
180
181CAlert CAlert::getAlertByHash(const uint256& hash)
182{

Callers 2

ThreadSendAlertFunction · 0.45
BOOST_AUTO_TEST_CASEFunction · 0.45

Calls 5

errorFunction · 0.85
VerifyECDSAMethod · 0.80
HashFunction · 0.70
beginMethod · 0.45
endMethod · 0.45

Tested by 1

BOOST_AUTO_TEST_CASEFunction · 0.36