leftovers of bitcoin#12803

This commit is contained in:
UdjinM6 2021-06-18 13:56:49 +03:00
parent 05f4da48fc
commit 99608c8b99
No known key found for this signature in database
GPG Key ID: 83592BD1400D58D9

View File

@ -358,11 +358,10 @@ bool IsSolvable(const SigningProvider& provider, const CScript& script)
// This check is to make sure that the script we created can actually be solved for and signed by us // This check is to make sure that the script we created can actually be solved for and signed by us
// if we were to have the private keys. This is just to make sure that the script is valid and that, // if we were to have the private keys. This is just to make sure that the script is valid and that,
// if found in a transaction, we would still accept and relay that transaction. // if found in a transaction, we would still accept and relay that transaction.
DummySignatureCreator creator(&provider);
SignatureData sigs; SignatureData sigs;
if (ProduceSignature(creator, script, sigs)) { if (ProduceSignature(provider, DUMMY_SIGNATURE_CREATOR, script, sigs)) {
// VerifyScript check is just defensive, and should never fail. // VerifyScript check is just defensive, and should never fail.
assert(VerifyScript(sigs.scriptSig, script, STANDARD_SCRIPT_VERIFY_FLAGS, creator.Checker())); assert(VerifyScript(sigs.scriptSig, script, STANDARD_SCRIPT_VERIFY_FLAGS, DUMMY_CHECKER));
return true; return true;
} }
return false; return false;