From b16f93caddcd3254eaf3dc43e09adf2142a9c40a Mon Sep 17 00:00:00 2001 From: Antoine Poinsot Date: Wed, 20 Jul 2022 12:42:08 +0200 Subject: script/sign: remove needless IsSolvable() utility It was used back when we didn't have a concept of descriptor. Now we can check for solvability using descriptors. --- src/wallet/scriptpubkeyman.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/wallet/scriptpubkeyman.cpp') diff --git a/src/wallet/scriptpubkeyman.cpp b/src/wallet/scriptpubkeyman.cpp index 1682ce2eef..b498ad5a17 100644 --- a/src/wallet/scriptpubkeyman.cpp +++ b/src/wallet/scriptpubkeyman.cpp @@ -1453,7 +1453,8 @@ void LegacyScriptPubKeyMan::LearnRelatedScripts(const CPubKey& key, OutputType t CTxDestination witdest = WitnessV0KeyHash(key.GetID()); CScript witprog = GetScriptForDestination(witdest); // Make sure the resulting program is solvable. - assert(IsSolvable(*this, witprog)); + const auto desc = InferDescriptor(witprog, *this); + assert(desc && desc->IsSolvable()); AddCScript(witprog); } } -- cgit v1.2.3