Merge bitcoin/bitcoin#32511: refactor: bdb removals

fafee85358 remove unused GetDestinationForKey (MarcoFalke)
fac72fef27 remove unused GetAllDestinationsForKey (MarcoFalke)
fa91d57de3 remove unused AddrToPubKey (MarcoFalke)
faecf158d9 remove unused Import* function signatures (MarcoFalke)

Pull request description:

  remove dead code

ACKs for top commit:
  davidgumberg:
    crACK https://github.com/bitcoin/bitcoin/pull/32511/commits/fafee85358397289aa4c6b799d2603a5d89e83a2
  achow101:
    ACK fafee85358
  rkrux:
    crACK fafee85358

Tree-SHA512: e48d4bf5f50b97dbd11260efdaf88277bd6a2478665b84353637d63e783003e90d29718836ffdc2e251ac9b77b22e616a0983a59d1b6658b3645a5575b871eae
This commit is contained in:
Ava Chow committed 2025-05-16 13:28:31 -07:00
commit c461d15287
9 files changed
+14 -91

No files matched your search

+3 -5
View File
@@ -84,13 +84,11 @@ void TestAddAddressesToSendBook(interfaces::Node& node)
wallet->SetupDescriptorScriptPubKeyMans();
}
auto build_address = [&wallet]() {
auto build_address{[]() {
CKey key = GenerateRandomKey();
CTxDestination dest(GetDestinationForKey(
key.GetPubKey(), wallet->m_default_address_type));
const PKHash dest{key.GetPubKey()};
return std::make_pair(dest, QString::fromStdString(EncodeDestination(dest)));
};
}};
CTxDestination r_key_dest, s_key_dest;
+2 -2
View File
@@ -217,7 +217,7 @@ std::shared_ptr<CWallet> SetupDescriptorsWallet(interfaces::Node& node, TestChai
WalletDescriptor w_desc(std::move(desc), 0, 0, 1, 1);
auto spk_manager = *Assert(wallet->AddWalletDescriptor(w_desc, provider, "", false));
assert(spk_manager);
CTxDestination dest = GetDestinationForKey(test.coinbaseKey.GetPubKey(), wallet->m_default_address_type);
const PKHash dest{test.coinbaseKey.GetPubKey()};
wallet->SetAddressBook(dest, "", wallet::AddressPurpose::RECEIVE);
wallet->SetLastBlockProcessed(105, WITH_LOCK(node.context()->chainman->GetMutex(), return node.context()->chainman->ActiveChain().Tip()->GetBlockHash()));
SyncUpWallet(wallet, node);
@@ -406,7 +406,7 @@ void TestGUIWatchOnly(interfaces::Node& node, TestChain100Setup& test)
sendCoinsDialog.findChild<QLabel*>("labelBalance"));
// Set change address
sendCoinsDialog.getCoinControl()->destChange = GetDestinationForKey(test.coinbaseKey.GetPubKey(), OutputType::LEGACY);
sendCoinsDialog.getCoinControl()->destChange = PKHash{test.coinbaseKey.GetPubKey()};
// Time to reject "save" PSBT dialog ('SendCoins' locks the main thread until the dialog receives the event).
QTimer timer;