Skip to content

Commit 32d036e

Browse files
committed
wallet: GetLabelAddresses requires cs_wallet lock
No change in behavior, the lock is already held at call sites.
1 parent 5fb6701 commit 32d036e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/wallet/wallet.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2191,7 +2191,7 @@ void CWallet::MarkDestinationsDirty(const std::set<CTxDestination>& destinations
21912191

21922192
std::set<CTxDestination> CWallet::GetLabelAddresses(const std::string& label) const
21932193
{
2194-
LOCK(cs_wallet);
2194+
AssertLockHeld(cs_wallet);
21952195
std::set<CTxDestination> result;
21962196
for (const std::pair<const CTxDestination, CAddressBookData>& item : m_address_book)
21972197
{

src/wallet/wallet.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -630,7 +630,7 @@ class CWallet final : public WalletStorage, public interfaces::Chain::Notificati
630630

631631
int64_t GetOldestKeyPoolTime() const;
632632

633-
std::set<CTxDestination> GetLabelAddresses(const std::string& label) const;
633+
std::set<CTxDestination> GetLabelAddresses(const std::string& label) const EXCLUSIVE_LOCKS_REQUIRED(cs_wallet);
634634

635635
/**
636636
* Marks all outputs in each one of the destinations dirty, so their cache is

0 commit comments

Comments
 (0)