Browse Source

Fixed issue 76 -- RPC error where addresses from addressbook's sending tab appear in listaccounts

0.8
Eric Swanson 14 years ago committed by Gavin Andresen
parent
commit
0a4cb86976
  1. 7
      rpc.cpp

7
rpc.cpp

@ -1150,8 +1150,11 @@ Value listaccounts(const Array& params, bool fHelp)
CRITICAL_BLOCK(cs_mapWallet) CRITICAL_BLOCK(cs_mapWallet)
CRITICAL_BLOCK(cs_mapAddressBook) CRITICAL_BLOCK(cs_mapAddressBook)
{ {
foreach(const PAIRTYPE(string, string)& entry, mapAddressBook) foreach(const PAIRTYPE(string, string)& entry, mapAddressBook) {
mapAccountBalances[entry.second] = 0; 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) for (map<uint256, CWalletTx>::iterator it = mapWallet.begin(); it != mapWallet.end(); ++it)
{ {

Loading…
Cancel
Save