Bugfixes walletclass
Some problems found by ius: * compiler complains with no return after critical section block * CKeyStore::GetPrivKey(key) was undefined for unknown key * missing return statement in GetChange()
This commit is contained in:
@@ -14,11 +14,15 @@ public:
|
||||
{
|
||||
return (mapKeys.count(vchPubKey) > 0);
|
||||
}
|
||||
CPrivKey GetPrivKey(const std::vector<unsigned char> &vchPubKey) const
|
||||
bool GetPrivKey(const std::vector<unsigned char> &vchPubKey, CPrivKey& keyOut) const
|
||||
{
|
||||
std::map<std::vector<unsigned char>, CPrivKey>::const_iterator mi = mapKeys.find(vchPubKey);
|
||||
if (mi != mapKeys.end())
|
||||
return (*mi).second;
|
||||
{
|
||||
keyOut = (*mi).second;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
std::vector<unsigned char> GenerateNewKey();
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user