@@ -297,7 +297,7 @@ void TestSatisfy(const std::string& testcase, const NodeRef& node) {
297
297
298
298
if (nonmal_success) {
299
299
// Non-malleable satisfactions are bounded by GetStackSize().
300
- BOOST_CHECK (witness_nonmal.stack .size () <= node->GetStackSize ());
300
+ BOOST_CHECK (witness_nonmal.stack .size () <= * node->GetStackSize ());
301
301
// If a non-malleable satisfaction exists, the malleable one must also exist, and be identical to it.
302
302
BOOST_CHECK (mal_success);
303
303
BOOST_CHECK (witness_nonmal.stack == witness_mal.stack );
@@ -375,8 +375,8 @@ void Test(const std::string& ms, const std::string& hexscript, int mode, int ops
375
375
auto inferred_miniscript = miniscript::FromScript (computed_script, CONVERTER);
376
376
BOOST_CHECK_MESSAGE (inferred_miniscript, " Cannot infer miniscript from script: " + ms);
377
377
BOOST_CHECK_MESSAGE (inferred_miniscript->ToScript (CONVERTER) == computed_script, " Roundtrip failure: miniscript->script != miniscript->script->miniscript->script: " + ms);
378
- if (opslimit != -1 ) BOOST_CHECK_MESSAGE ((int )node->GetOps () == opslimit, " Ops limit mismatch: " << ms << " (" << node->GetOps () << " vs " << opslimit << " )" );
379
- if (stacklimit != -1 ) BOOST_CHECK_MESSAGE ((int )node->GetStackSize () == stacklimit, " Stack limit mismatch: " << ms << " (" << node->GetStackSize () << " vs " << stacklimit << " )" );
378
+ if (opslimit != -1 ) BOOST_CHECK_MESSAGE ((int )* node->GetOps () == opslimit, " Ops limit mismatch: " << ms << " (" << * node->GetOps () << " vs " << opslimit << " )" );
379
+ if (stacklimit != -1 ) BOOST_CHECK_MESSAGE ((int )* node->GetStackSize () == stacklimit, " Stack limit mismatch: " << ms << " (" << * node->GetStackSize () << " vs " << stacklimit << " )" );
380
380
TestSatisfy (ms, node);
381
381
}
382
382
}
@@ -498,8 +498,8 @@ BOOST_AUTO_TEST_CASE(fixed_tests)
498
498
// For CHECKMULTISIG the OP cost is the number of keys, but the stack size is the number of sigs (+1)
499
499
const auto ms_multi = miniscript::FromString (" multi(1,03d30199d74fb5a22d47b6e054e2f378cedacffcb89904a61d75d0dbd407143e65,03fff97bd5755eeea420453a14355235d382f6472f8568a18b2f057a1460297556,0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798)" , CONVERTER);
500
500
BOOST_CHECK (ms_multi);
501
- BOOST_CHECK_EQUAL (ms_multi->GetOps (), 4 ); // 3 pubkeys + CMS
502
- BOOST_CHECK_EQUAL (ms_multi->GetStackSize (), 3 ); // 1 sig + dummy elem + script push
501
+ BOOST_CHECK_EQUAL (* ms_multi->GetOps (), 4 ); // 3 pubkeys + CMS
502
+ BOOST_CHECK_EQUAL (* ms_multi->GetStackSize (), 3 ); // 1 sig + dummy elem + script push
503
503
// The 'd:' wrapper leaves on the stack what was DUP'ed at the beginning of its execution.
504
504
// Since it contains an OP_IF just after on the same element, we can make sure that the element
505
505
// in question must be OP_1 if OP_IF enforces that its argument must only be OP_1 or the empty
0 commit comments