MCPcopy Create free account
hub / github.com/WaykiChain/WaykiChain / CheckSignature

Method CheckSignature

src/alert.cpp:128–137  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

126}
127
128bool CAlert::CheckSignature() const {
129 CPubKey key(SysCfg().AlertKey());
130 if (!key.Verify(Hash(vchMsg.begin(), vchMsg.end()), vchSig))
131 return ERRORMSG("CAlert::CheckSignature() : verify signature failed");
132
133 // Now unserialize the data
134 CDataStream sMsg(vchMsg, SER_NETWORK, PROTOCOL_VERSION);
135 sMsg >> *(CUnsignedAlert*)this;
136 return true;
137}
138
139CAlert CAlert::getAlertByHash(const uint256 &hash) {
140 CAlert retval;

Callers

nothing calls this directly

Calls 4

HashFunction · 0.50
VerifyMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected