get rid of mapPubKeys

Make CKeyStore's interface work on uint160's instead of pubkeys, so
no separate global mapPubKeys is necessary anymore.
This commit is contained in:
Pieter Wuille
2011-07-05 16:42:32 +02:00
parent 133ccbe408
commit 03fbd79049
11 changed files with 97 additions and 110 deletions

View File

@@ -104,10 +104,10 @@ public:
}
bool IsChange(const CTxOut& txout) const
{
std::vector<unsigned char> vchPubKey;
if (ExtractPubKey(txout.scriptPubKey, this, vchPubKey))
uint160 hash160;
if (ExtractHash160(txout.scriptPubKey, this, hash160))
CRITICAL_BLOCK(cs_mapAddressBook)
if (!mapAddressBook.count(PubKeyToAddress(vchPubKey)))
if (!mapAddressBook.count(Hash160ToAddress(hash160)))
return true;
return false;
}