Remove ScriptHash from CScriptID constructor

Replaces the constructor in CScriptID that converts a ScriptHash with a
function ToScriptID that does the same. This prepares for a move of
CScriptID to avoid a circular dependency.
This commit is contained in:
Andrew Chow
2023-08-08 10:35:08 -04:00
parent cba69dda3d
commit b81ebff0d9
5 changed files with 9 additions and 7 deletions

View File

@@ -205,7 +205,7 @@ CKeyID GetKeyForDestination(const SigningProvider& store, const CTxDestination&
}
if (auto script_hash = std::get_if<ScriptHash>(&dest)) {
CScript script;
CScriptID script_id(*script_hash);
CScriptID script_id = ToScriptID(*script_hash);
CTxDestination inner_dest;
if (store.GetCScript(script_id, script) && ExtractDestination(script, inner_dest)) {
if (auto inner_witness_id = std::get_if<WitnessV0KeyHash>(&inner_dest)) {