diff options
author | Stéphane Gimenez <dev@gim.name> | 2011-06-27 23:22:30 +0200 |
---|---|---|
committer | Stéphane Gimenez <dev@gim.name> | 2011-06-27 23:22:30 +0200 |
commit | 4d410cfce967a42cca7db13288b72baec29423d1 (patch) | |
tree | cf81efbed4c5a9d8bc2ee56e752887befdd0760a /src/wallet.h | |
parent | d0d80170a2ca73004e08fb85007fe055cbf4e411 (diff) |
Fix AddressBook syncrhonization between a CWallet and CWalletDB
This problem was reported independently by laanwj in Issue #350.
Diffstat (limited to 'src/wallet.h')
-rw-r--r-- | src/wallet.h | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/wallet.h b/src/wallet.h index b069d31ce9..bf7d8cc51f 100644 --- a/src/wallet.h +++ b/src/wallet.h @@ -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) { |