mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-09-11 21:20:39 +02:00
wallet: remove unused DescriptorScriptPubKeyMan::AddDescriptorKey
The private method has no callers. It opened a `WalletBatch` and
forwarded to `AddDescriptorKeyWithDB`, which is still called from two
other places.
Its last caller, in `CWallet::AddWalletDescriptor`, was replaced in
aa4f7823aa ("wallet: include keys when constructing DescriptorSPKM
during import"), which builds the manager with `CreateFromMigration`
instead of adding the key afterwards.
This commit is contained in:
@@ -1173,15 +1173,6 @@ std::vector<WalletDestination> DescriptorScriptPubKeyMan::MarkUnusedAddresses(co
|
||||
return result;
|
||||
}
|
||||
|
||||
void DescriptorScriptPubKeyMan::AddDescriptorKey(const CKey& key, const CPubKey &pubkey)
|
||||
{
|
||||
LOCK(cs_desc_man);
|
||||
WalletBatch batch(m_storage.GetDatabase());
|
||||
if (!AddDescriptorKeyWithDB(batch, key, pubkey)) {
|
||||
throw std::runtime_error(std::string(__func__) + ": writing descriptor private key failed");
|
||||
}
|
||||
}
|
||||
|
||||
bool DescriptorScriptPubKeyMan::AddDescriptorKeyWithDB(WalletBatch& batch, const CKey& key, const CPubKey &pubkey)
|
||||
{
|
||||
AssertLockHeld(cs_desc_man);
|
||||
|
||||
@@ -321,7 +321,6 @@ private:
|
||||
|
||||
void Load();
|
||||
|
||||
void AddDescriptorKey(const CKey& key, const CPubKey &pubkey);
|
||||
void UpdateWithSigningProvider(WalletBatch& batch, const FlatSigningProvider& signing_provider) EXCLUSIVE_LOCKS_REQUIRED(cs_desc_man);
|
||||
|
||||
//! Setup descriptors based on the given CExtKey
|
||||
|
||||
Reference in New Issue
Block a user