mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-20 07:09:15 +01:00
Use explicit conversion from WitnessV0KeyHash -> CKeyID
These types are equivalent, in data etc, so they need only their data cast across.
This commit is contained in:
@@ -183,7 +183,7 @@ CKeyID GetKeyForDestination(const SigningProvider& store, const CTxDestination&
|
||||
return ToKeyID(*id);
|
||||
}
|
||||
if (auto witness_id = boost::get<WitnessV0KeyHash>(&dest)) {
|
||||
return CKeyID(*witness_id);
|
||||
return ToKeyID(*witness_id);
|
||||
}
|
||||
if (auto script_hash = boost::get<ScriptHash>(&dest)) {
|
||||
CScript script;
|
||||
@@ -191,7 +191,7 @@ CKeyID GetKeyForDestination(const SigningProvider& store, const CTxDestination&
|
||||
CTxDestination inner_dest;
|
||||
if (store.GetCScript(script_id, script) && ExtractDestination(script, inner_dest)) {
|
||||
if (auto inner_witness_id = boost::get<WitnessV0KeyHash>(&inner_dest)) {
|
||||
return CKeyID(*inner_witness_id);
|
||||
return ToKeyID(*inner_witness_id);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user