Fix AddressBook syncrhonization between a CWallet and CWalletDB

This problem was reported independently by laanwj in Issue #350.
This commit is contained in:
Stéphane Gimenez
2011-06-27 23:22:30 +02:00
parent d0d80170a2
commit 4d410cfce9
4 changed files with 45 additions and 16 deletions

View File

@@ -150,12 +150,11 @@ public:
bool LoadWallet(bool& fFirstRunRet);
// bool BackupWallet(const std::string& strDest);
bool SetAddressBookName(const std::string& strAddress, const std::string& strName)
{
if (!fFileBacked)
return false;
return CWalletDB(strWalletFile).WriteName(strAddress, strName);
}
// requires cs_mapAddressBook lock
bool SetAddressBookName(const std::string& strAddress, const std::string& strName);
// requires cs_mapAddressBook lock
bool DelAddressBookName(const std::string& strAddress);
void UpdatedTransaction(const uint256 &hashTx)
{