diff options
| author | Eric Swanson <[email protected]> | 2011-03-20 18:32:39 -0400 |
|---|---|---|
| committer | Gavin Andresen <[email protected]> | 2011-04-05 20:00:01 -0400 |
| commit | 0a4cb8697645b61f781421aa10cf3f7841f776e5 (patch) | |
| tree | 38238a5a2d51e871a11f3f9839f271d8ce73acaf | |
| parent | Merge branch 'deadlock-fixes' of https://github.com/jgarzik/bitcoin (diff) | |
| download | discoin-0a4cb8697645b61f781421aa10cf3f7841f776e5.tar.xz discoin-0a4cb8697645b61f781421aa10cf3f7841f776e5.zip | |
Fixed issue 76 -- RPC error where addresses from addressbook's sending tab appear in listaccounts
| -rw-r--r-- | rpc.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -1150,8 +1150,11 @@ Value listaccounts(const Array& params, bool fHelp) CRITICAL_BLOCK(cs_mapWallet) CRITICAL_BLOCK(cs_mapAddressBook) { - foreach(const PAIRTYPE(string, string)& entry, mapAddressBook) - mapAccountBalances[entry.second] = 0; + foreach(const PAIRTYPE(string, string)& entry, mapAddressBook) { + uint160 hash160; + if(AddressToHash160(entry.first, hash160) && mapPubKeys.count(hash160)) // This address belongs to me + mapAccountBalances[entry.second] = 0; + } for (map<uint256, CWalletTx>::iterator it = mapWallet.begin(); it != mapWallet.end(); ++it) { |