diff options
Diffstat (limited to 'src/wallet.cpp')
-rw-r--r-- | src/wallet.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/wallet.cpp b/src/wallet.cpp index 8b9f3d34e1..4f3516953c 100644 --- a/src/wallet.cpp +++ b/src/wallet.cpp @@ -717,8 +717,8 @@ void CWalletTx::GetAccountAmounts(const string& strAccount, int64& nReceived, { if (pwallet->mapAddressBook.count(r.first)) { - map<CTxDestination, string>::const_iterator mi = pwallet->mapAddressBook.find(r.first); - if (mi != pwallet->mapAddressBook.end() && (*mi).second == strAccount) + map<CTxDestination, CAddressBookData>::const_iterator mi = pwallet->mapAddressBook.find(r.first); + if (mi != pwallet->mapAddressBook.end() && (*mi).second.name == strAccount) nReceived += r.second; } else if (strAccount.empty()) @@ -1459,8 +1459,8 @@ DBErrors CWallet::LoadWallet(bool& fFirstRunRet) bool CWallet::SetAddressBookName(const CTxDestination& address, const string& strName) { - std::map<CTxDestination, std::string>::iterator mi = mapAddressBook.find(address); - mapAddressBook[address] = strName; + std::map<CTxDestination, CAddressBookData>::iterator mi = mapAddressBook.find(address); + mapAddressBook[address].name = strName; NotifyAddressBookChanged(this, address, strName, ::IsMine(*this, address), (mi == mapAddressBook.end()) ? CT_NEW : CT_UPDATED); if (!fFileBacked) return false; |