mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-20 15:19:07 +01:00
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:
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user