aboutsummaryrefslogtreecommitdiff
path: root/src/test/sigopcount_tests.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2014-09-17 12:08:53 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2014-09-17 13:04:54 +0200
commit69dd8c919aa3a1b88af34265f828fe0a58a55014 (patch)
tree672551d1afcb67ad45a24450ac753cfbd31d2e1e /src/test/sigopcount_tests.cpp
parent651a1fcf813983e8e5f6f180e062a5111e900dad (diff)
parent0be990ba34110184c8a5a2c04094311dab5cd84c (diff)
Merge pull request #4899
0be990b Move CTxDestination from script/script to script/standard (Pieter Wuille)
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;