diff options
author | MarcoFalke <falke.marco@gmail.com> | 2019-02-07 14:46:08 -0500 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2019-02-07 15:22:14 -0500 |
commit | faa46475d7d7dc60dcc80be34826cf98fb25dc95 (patch) | |
tree | 09c37985d69ba643c9b0cd7693345f13acf3d282 /src/wallet/wallet.cpp | |
parent | 72d34c0edc5ad9e69e0d054459ec15d2278f206b (diff) | |
download | bitcoin-faa46475d7d7dc60dcc80be34826cf98fb25dc95.tar.xz |
wallet: Add lock annotation for mapAddressBook
Diffstat (limited to 'src/wallet/wallet.cpp')
-rw-r--r-- | src/wallet/wallet.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index bdddcd718b..af93653375 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -3172,7 +3172,7 @@ bool CWallet::SetAddressBook(const CTxDestination& address, const std::string& s { bool fUpdated = false; { - LOCK(cs_wallet); // mapAddressBook + LOCK(cs_wallet); std::map<CTxDestination, CAddressBookData>::iterator mi = mapAddressBook.find(address); fUpdated = mi != mapAddressBook.end(); mapAddressBook[address].name = strName; @@ -3189,7 +3189,7 @@ bool CWallet::SetAddressBook(const CTxDestination& address, const std::string& s bool CWallet::DelAddressBook(const CTxDestination& address) { { - LOCK(cs_wallet); // mapAddressBook + LOCK(cs_wallet); // Delete destdata tuples associated with address std::string strAddress = EncodeDestination(address); @@ -3869,7 +3869,6 @@ bool CWallet::GetDestData(const CTxDestination &dest, const std::string &key, st std::vector<std::string> CWallet::GetDestValues(const std::string& prefix) const { - LOCK(cs_wallet); std::vector<std::string> values; for (const auto& address : mapAddressBook) { for (const auto& data : address.second.destdata) { |