aboutsummaryrefslogtreecommitdiff
path: root/src/wallet.h
diff options
context:
space:
mode:
authorStéphane Gimenez <dev@gim.name>2011-06-27 23:22:30 +0200
committerStéphane Gimenez <dev@gim.name>2011-06-27 23:22:30 +0200
commit4d410cfce967a42cca7db13288b72baec29423d1 (patch)
treecf81efbed4c5a9d8bc2ee56e752887befdd0760a /src/wallet.h
parentd0d80170a2ca73004e08fb85007fe055cbf4e411 (diff)
downloadbitcoin-4d410cfce967a42cca7db13288b72baec29423d1.tar.xz
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.h11
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)
{