Skip to content

Commit 0d7e8d6

Browse files
committed
Merge #17203: wallet: Remove unused GetLabelName
7ca68e1 wallet: Remove unused GetLabelName (Sebastian Falbesoner) Pull request description: While taking a look at #17198 I noticed that the method `CWallet::GetLabelName(...)` is not used anymore, since the `account` API was removed (c9c32e6). ACKs for top commit: practicalswift: ACK 7ca68e1 promag: ACK 7ca68e1. fanquake: ACK 7ca68e1 Tree-SHA512: 6825d77a85934e2368a3fb44c8db0ed0872aa5606e3761decb0a6b7e3773277afa7021bf1f71009207c3961cdd0a1c448854ea2fd8be95c3afec466254faf82d
2 parents b8f041a + 7ca68e1 commit 0d7e8d6

File tree

2 files changed

+0
-17
lines changed

2 files changed

+0
-17
lines changed

src/wallet/wallet.cpp

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3468,21 +3468,6 @@ bool CWallet::DelAddressBook(const CTxDestination& address)
34683468
return WalletBatch(*database).EraseName(EncodeDestination(address));
34693469
}
34703470

3471-
const std::string& CWallet::GetLabelName(const CScript& scriptPubKey) const
3472-
{
3473-
CTxDestination address;
3474-
if (ExtractDestination(scriptPubKey, address) && !scriptPubKey.IsUnspendable()) {
3475-
auto mi = mapAddressBook.find(address);
3476-
if (mi != mapAddressBook.end()) {
3477-
return mi->second.name;
3478-
}
3479-
}
3480-
// A scriptPubKey that doesn't have an entry in the address book is
3481-
// associated with the default label ("").
3482-
const static std::string DEFAULT_LABEL_NAME;
3483-
return DEFAULT_LABEL_NAME;
3484-
}
3485-
34863471
/**
34873472
* Mark old keypool keys as used,
34883473
* and generate all new keys

src/wallet/wallet.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1245,8 +1245,6 @@ class CWallet final : public FillableSigningProvider, private interfaces::Chain:
12451245

12461246
bool DelAddressBook(const CTxDestination& address);
12471247

1248-
const std::string& GetLabelName(const CScript& scriptPubKey) const EXCLUSIVE_LOCKS_REQUIRED(cs_wallet);
1249-
12501248
unsigned int GetKeyPoolSize() EXCLUSIVE_LOCKS_REQUIRED(cs_wallet)
12511249
{
12521250
AssertLockHeld(cs_wallet);

0 commit comments

Comments
 (0)