diff options
| author | Stéphane Gimenez <[email protected]> | 2011-06-27 23:22:30 +0200 |
|---|---|---|
| committer | Stéphane Gimenez <[email protected]> | 2011-06-27 23:22:30 +0200 |
| commit | 4d410cfce967a42cca7db13288b72baec29423d1 (patch) | |
| tree | cf81efbed4c5a9d8bc2ee56e752887befdd0760a /src/wallet.h | |
| parent | Merge pull request #347 from sipa/delkeyuser (diff) | |
| download | discoin-4d410cfce967a42cca7db13288b72baec29423d1.tar.xz discoin-4d410cfce967a42cca7db13288b72baec29423d1.zip | |
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 b069d31ce..bf7d8cc51 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) { |