aboutsummaryrefslogtreecommitdiff
path: root/src/test/sigopcount_tests.cpp
diff options
context:
space:
mode:
authorPieter Wuille <pieter.wuille@gmail.com>2014-09-11 19:15:29 +0200
committerPieter Wuille <pieter.wuille@gmail.com>2014-09-16 19:14:32 +0200
commit0be990ba34110184c8a5a2c04094311dab5cd84c (patch)
tree2eb24931c396ae0dc0c57fee42f345c581bd58c6 /src/test/sigopcount_tests.cpp
parentab3834baae2e48708de2be74217eaf9da9081fc3 (diff)
Move CTxDestination from script/script to script/standard
Diffstat (limited to 'src/test/sigopcount_tests.cpp')
-rw-r--r--src/test/sigopcount_tests.cpp9
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;