remove unused GetDestinationForKey

It is only used in test. There it is problematic, because it sometimes
relies on m_default_address_type. If the default were changed to
BECH32M, those tests would fail the assert(false).

So just use PKHash{} in all tests and remove GetDestinationForKey.
This commit is contained in:
MarcoFalke
2025-05-15 14:32:58 +02:00
parent fac72fef27
commit fafee85358
6 changed files with 7 additions and 36 deletions

View File

@@ -174,7 +174,7 @@ FUZZ_TARGET(key, .init = initialize_key)
assert(v_solutions_ret_tx_multisig[2].size() == 1);
OutputType output_type{};
const CTxDestination tx_destination = GetDestinationForKey(pubkey, output_type);
const CTxDestination tx_destination{PKHash{pubkey}};
assert(output_type == OutputType::LEGACY);
assert(IsValidDestination(tx_destination));
assert(PKHash{pubkey} == *std::get_if<PKHash>(&tx_destination));