aboutsummaryrefslogtreecommitdiff
path: root/src/test/sigopcount_tests.cpp
diff options
context:
space:
mode:
authorCory Fields <cory-nospam-@coryfields.com>2014-09-24 22:54:08 -0400
committerCory Fields <cory-nospam-@coryfields.com>2014-10-17 13:44:14 -0400
commite9ca4280f3abb8b2b6fa35a41e881996278ebfff (patch)
treeee09dcf4ec7f9177ee329581382e001459ff2e16 /src/test/sigopcount_tests.cpp
parent066e2a1403fe306787a2ce0c8571aa9de57386cf (diff)
downloadbitcoin-e9ca4280f3abb8b2b6fa35a41e881996278ebfff.tar.xz
script: add ToByteVector() for converting anything with begin/end
This should move to a util header once their dependencies are cleaned up.
Diffstat (limited to 'src/test/sigopcount_tests.cpp')
-rw-r--r--src/test/sigopcount_tests.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/test/sigopcount_tests.cpp b/src/test/sigopcount_tests.cpp
index 4ce2c87a0d..7b27703b62 100644
--- a/src/test/sigopcount_tests.cpp
+++ b/src/test/sigopcount_tests.cpp
@@ -31,8 +31,8 @@ BOOST_AUTO_TEST_CASE(GetSigOpCount)
BOOST_CHECK_EQUAL(s1.GetSigOpCount(false), 0U);
BOOST_CHECK_EQUAL(s1.GetSigOpCount(true), 0U);
- uint160 dummy;
- s1 << OP_1 << dummy << dummy << OP_2 << OP_CHECKMULTISIG;
+ uint160 dummy(0);
+ s1 << OP_1 << ToByteVector(dummy) << ToByteVector(dummy) << OP_2 << OP_CHECKMULTISIG;
BOOST_CHECK_EQUAL(s1.GetSigOpCount(true), 2U);
s1 << OP_IF << OP_CHECKSIG << OP_ENDIF;
BOOST_CHECK_EQUAL(s1.GetSigOpCount(true), 3U);
@@ -58,7 +58,7 @@ BOOST_AUTO_TEST_CASE(GetSigOpCount)
BOOST_CHECK_EQUAL(p2sh.GetSigOpCount(true), 0U);
BOOST_CHECK_EQUAL(p2sh.GetSigOpCount(false), 0U);
CScript scriptSig2;
- scriptSig2 << OP_1 << dummy << dummy << Serialize(s2);
+ scriptSig2 << OP_1 << ToByteVector(dummy) << ToByteVector(dummy) << Serialize(s2);
BOOST_CHECK_EQUAL(p2sh.GetSigOpCount(scriptSig2), 3U);
}