diff options
author | João Barbosa <joao.paulo.barbosa@gmail.com> | 2020-08-29 15:26:39 +0100 |
---|---|---|
committer | João Barbosa <joao.paulo.barbosa@gmail.com> | 2021-09-03 18:28:12 +0100 |
commit | 32d036e8dab5f5b24096d9765236441e7b6a3b34 (patch) | |
tree | 396c6cbc499808a223a215e424d108f9ed6a2a10 /src | |
parent | 5fb6701bdb05f935ab65d8fe0fcc15c12e32d134 (diff) | |
download | bitcoin-32d036e8dab5f5b24096d9765236441e7b6a3b34.tar.xz |
wallet: GetLabelAddresses requires cs_wallet lock
No change in behavior, the lock is already held at call sites.
Diffstat (limited to 'src')
-rw-r--r-- | src/wallet/wallet.cpp | 2 | ||||
-rw-r--r-- | src/wallet/wallet.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index f3af9885a2..1216bf5e08 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -2191,7 +2191,7 @@ void CWallet::MarkDestinationsDirty(const std::set<CTxDestination>& destinations std::set<CTxDestination> CWallet::GetLabelAddresses(const std::string& label) const { - LOCK(cs_wallet); + AssertLockHeld(cs_wallet); std::set<CTxDestination> result; for (const std::pair<const CTxDestination, CAddressBookData>& item : m_address_book) { diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h index fbeec2aa30..48efbbfde6 100644 --- a/src/wallet/wallet.h +++ b/src/wallet/wallet.h @@ -630,7 +630,7 @@ public: int64_t GetOldestKeyPoolTime() const; - std::set<CTxDestination> GetLabelAddresses(const std::string& label) const; + std::set<CTxDestination> GetLabelAddresses(const std::string& label) const EXCLUSIVE_LOCKS_REQUIRED(cs_wallet); /** * Marks all outputs in each one of the destinations dirty, so their cache is |