diff options
| author | Pieter Wuille <[email protected]> | 2011-07-05 16:42:32 +0200 |
|---|---|---|
| committer | Pieter Wuille <[email protected]> | 2011-07-17 12:07:59 +0200 |
| commit | 03fbd7904903928b0d1c8542a3d597aaf5bdd31b (patch) | |
| tree | 562344a9b651ea1b2cc3f7ffd348377e5bed6090 /src/rpc.cpp | |
| parent | Merge pull request #418 from EricJ2190/master (diff) | |
| download | discoin-03fbd7904903928b0d1c8542a3d597aaf5bdd31b.tar.xz discoin-03fbd7904903928b0d1c8542a3d597aaf5bdd31b.zip | |
get rid of mapPubKeys
Make CKeyStore's interface work on uint160's instead of pubkeys, so
no separate global mapPubKeys is necessary anymore.
Diffstat (limited to 'src/rpc.cpp')
| -rw-r--r-- | src/rpc.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/rpc.cpp b/src/rpc.cpp index fa14fc0b2..469805827 100644 --- a/src/rpc.cpp +++ b/src/rpc.cpp @@ -967,7 +967,7 @@ Value ListReceived(const Array& params, bool fByAccounts) { // Only counting our own bitcoin addresses and not ip addresses uint160 hash160 = txout.scriptPubKey.GetBitcoinAddressHash160(); - if (hash160 == 0 || !mapPubKeys.count(hash160)) // IsMine + if (hash160 == 0 || !pwalletMain->HaveKey(hash160)) // IsMine continue; tallyitem& item = mapTally[hash160]; @@ -1242,7 +1242,7 @@ Value listaccounts(const Array& params, bool fHelp) { BOOST_FOREACH(const PAIRTYPE(string, string)& entry, pwalletMain->mapAddressBook) { uint160 hash160; - if(AddressToHash160(entry.first, hash160) && mapPubKeys.count(hash160)) // This address belongs to me + if(AddressToHash160(entry.first, hash160) && pwalletMain->HaveKey(hash160)) // This address belongs to me mapAccountBalances[entry.second] = 0; } @@ -1564,7 +1564,7 @@ Value validateaddress(const Array& params, bool fHelp) // version of the address: string currentAddress = Hash160ToAddress(hash160); ret.push_back(Pair("address", currentAddress)); - ret.push_back(Pair("ismine", (mapPubKeys.count(hash160) > 0))); + ret.push_back(Pair("ismine", (pwalletMain->HaveKey(hash160) > 0))); CRITICAL_BLOCK(pwalletMain->cs_mapAddressBook) { if (pwalletMain->mapAddressBook.count(currentAddress)) |