diff options
author | Antoine Poinsot <darosior@protonmail.com> | 2022-07-20 12:42:08 +0200 |
---|---|---|
committer | Antoine Poinsot <darosior@protonmail.com> | 2022-08-11 15:43:40 +0200 |
commit | b16f93caddcd3254eaf3dc43e09adf2142a9c40a (patch) | |
tree | 675b615337627dead3cde665e3bb3e951e54565f /src/test | |
parent | c232ef20c0fd2e3b55355e52684091cad3af5247 (diff) |
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.
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/descriptor_tests.cpp | 3 | ||||
-rw-r--r-- | src/test/fuzz/key.cpp | 2 | ||||
-rw-r--r-- | src/test/fuzz/script.cpp | 1 |
3 files changed, 1 insertions, 5 deletions
diff --git a/src/test/descriptor_tests.cpp b/src/test/descriptor_tests.cpp index a8c666079d..5635b5a72c 100644 --- a/src/test/descriptor_tests.cpp +++ b/src/test/descriptor_tests.cpp @@ -302,7 +302,6 @@ void DoCheck(const std::string& prv, const std::string& pub, const std::string& // For each of the produced scripts, verify solvability, and when possible, try to sign a transaction spending it. for (size_t n = 0; n < spks.size(); ++n) { BOOST_CHECK_EQUAL(ref[n], HexStr(spks[n])); - BOOST_CHECK_EQUAL(IsSolvable(Merge(key_provider, script_provider), spks[n]), (flags & UNSOLVABLE) == 0); if (flags & SIGNABLE) { CMutableTransaction spend; @@ -324,7 +323,7 @@ void DoCheck(const std::string& prv, const std::string& pub, const std::string& BOOST_CHECK(inferred->Expand(0, provider_inferred, spks_inferred, provider_inferred)); BOOST_CHECK_EQUAL(spks_inferred.size(), 1U); BOOST_CHECK(spks_inferred[0] == spks[n]); - BOOST_CHECK_EQUAL(IsSolvable(provider_inferred, spks_inferred[0]), !(flags & UNSOLVABLE)); + BOOST_CHECK_EQUAL(InferDescriptor(spks_inferred[0], provider_inferred)->IsSolvable(), !(flags & UNSOLVABLE)); BOOST_CHECK(GetKeyOriginData(provider_inferred, flags) == GetKeyOriginData(script_provider, flags)); } diff --git a/src/test/fuzz/key.cpp b/src/test/fuzz/key.cpp index 6d2d2e2bc5..a76901e473 100644 --- a/src/test/fuzz/key.cpp +++ b/src/test/fuzz/key.cpp @@ -138,8 +138,6 @@ FUZZ_TARGET_INIT(key, initialize_key) assert(tx_multisig_script.size() == 37); FillableSigningProvider fillable_signing_provider; - assert(IsSolvable(fillable_signing_provider, tx_pubkey_script)); - assert(IsSolvable(fillable_signing_provider, tx_multisig_script)); assert(!IsSegWitOutput(fillable_signing_provider, tx_pubkey_script)); assert(!IsSegWitOutput(fillable_signing_provider, tx_multisig_script)); assert(fillable_signing_provider.GetKeys().size() == 0); diff --git a/src/test/fuzz/script.cpp b/src/test/fuzz/script.cpp index 69a4b782aa..00d7b7e29a 100644 --- a/src/test/fuzz/script.cpp +++ b/src/test/fuzz/script.cpp @@ -89,7 +89,6 @@ FUZZ_TARGET_INIT(script, initialize_script) const FlatSigningProvider signing_provider; (void)InferDescriptor(script, signing_provider); (void)IsSegWitOutput(signing_provider, script); - (void)IsSolvable(signing_provider, script); (void)RecursiveDynamicUsage(script); |