CSecret/CKey -> CKey/CPubKey split/refactor

This commit is contained in:
Pieter Wuille
2013-05-01 06:52:05 +02:00
committed by Pieter Wuille
parent 5d891489ab
commit dfa23b94c2
26 changed files with 578 additions and 609 deletions

View File

@@ -144,9 +144,7 @@ bool CAlert::RelayTo(CNode* pnode) const
bool CAlert::CheckSignature() const
{
CKey key;
if (!key.SetPubKey(ParseHex(fTestNet ? pszTestKey : pszMainKey)))
return error("CAlert::CheckSignature() : SetPubKey failed");
CPubKey key(ParseHex(fTestNet ? pszTestKey : pszMainKey));
if (!key.Verify(Hash(vchMsg.begin(), vchMsg.end()), vchSig))
return error("CAlert::CheckSignature() : verify signature failed");