mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-06-21 06:12:30 +02:00
Merge #17203: wallet: Remove unused GetLabelName
7ca68e1461376afc22a26268c80a7281522ed9eb 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 (c9c32e6b844fc79467b7e24c6c916142a0d08484). ACKs for top commit: practicalswift: ACK 7ca68e1461376afc22a26268c80a7281522ed9eb promag: ACK 7ca68e1461376afc22a26268c80a7281522ed9eb. fanquake: ACK 7ca68e1461376afc22a26268c80a7281522ed9eb Tree-SHA512: 6825d77a85934e2368a3fb44c8db0ed0872aa5606e3761decb0a6b7e3773277afa7021bf1f71009207c3961cdd0a1c448854ea2fd8be95c3afec466254faf82d
This commit is contained in:
commit
0d7e8d66c4
@ -3468,21 +3468,6 @@ bool CWallet::DelAddressBook(const CTxDestination& address)
|
|||||||
return WalletBatch(*database).EraseName(EncodeDestination(address));
|
return WalletBatch(*database).EraseName(EncodeDestination(address));
|
||||||
}
|
}
|
||||||
|
|
||||||
const std::string& CWallet::GetLabelName(const CScript& scriptPubKey) const
|
|
||||||
{
|
|
||||||
CTxDestination address;
|
|
||||||
if (ExtractDestination(scriptPubKey, address) && !scriptPubKey.IsUnspendable()) {
|
|
||||||
auto mi = mapAddressBook.find(address);
|
|
||||||
if (mi != mapAddressBook.end()) {
|
|
||||||
return mi->second.name;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// A scriptPubKey that doesn't have an entry in the address book is
|
|
||||||
// associated with the default label ("").
|
|
||||||
const static std::string DEFAULT_LABEL_NAME;
|
|
||||||
return DEFAULT_LABEL_NAME;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Mark old keypool keys as used,
|
* Mark old keypool keys as used,
|
||||||
* and generate all new keys
|
* and generate all new keys
|
||||||
|
@ -1245,8 +1245,6 @@ public:
|
|||||||
|
|
||||||
bool DelAddressBook(const CTxDestination& address);
|
bool DelAddressBook(const CTxDestination& address);
|
||||||
|
|
||||||
const std::string& GetLabelName(const CScript& scriptPubKey) const EXCLUSIVE_LOCKS_REQUIRED(cs_wallet);
|
|
||||||
|
|
||||||
unsigned int GetKeyPoolSize() EXCLUSIVE_LOCKS_REQUIRED(cs_wallet)
|
unsigned int GetKeyPoolSize() EXCLUSIVE_LOCKS_REQUIRED(cs_wallet)
|
||||||
{
|
{
|
||||||
AssertLockHeld(cs_wallet);
|
AssertLockHeld(cs_wallet);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user