diff options
Diffstat (limited to 'src/test/sigopcount_tests.cpp')
-rw-r--r-- | src/test/sigopcount_tests.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/test/sigopcount_tests.cpp b/src/test/sigopcount_tests.cpp index 2d10c356ac..62a6cd63d6 100644 --- a/src/test/sigopcount_tests.cpp +++ b/src/test/sigopcount_tests.cpp @@ -4,6 +4,7 @@ #include "key.h" #include "script/script.h" +#include "script/standard.h" #include "uint256.h" #include <vector> @@ -37,8 +38,7 @@ BOOST_AUTO_TEST_CASE(GetSigOpCount) BOOST_CHECK_EQUAL(s1.GetSigOpCount(true), 3U); BOOST_CHECK_EQUAL(s1.GetSigOpCount(false), 21U); - CScript p2sh; - p2sh.SetDestination(s1.GetID()); + CScript p2sh = GetScriptForDestination(s1.GetID()); CScript scriptSig; scriptSig << OP_0 << Serialize(s1); BOOST_CHECK_EQUAL(p2sh.GetSigOpCount(scriptSig), 3U); @@ -50,12 +50,11 @@ BOOST_AUTO_TEST_CASE(GetSigOpCount) k.MakeNewKey(true); keys.push_back(k.GetPubKey()); } - CScript s2; - s2.SetMultisig(1, keys); + CScript s2 = GetScriptForMultisig(1, keys); BOOST_CHECK_EQUAL(s2.GetSigOpCount(true), 3U); BOOST_CHECK_EQUAL(s2.GetSigOpCount(false), 20U); - p2sh.SetDestination(s2.GetID()); + p2sh = GetScriptForDestination(s2.GetID()); BOOST_CHECK_EQUAL(p2sh.GetSigOpCount(true), 0U); BOOST_CHECK_EQUAL(p2sh.GetSigOpCount(false), 0U); CScript scriptSig2; |