From e9ca4280f3abb8b2b6fa35a41e881996278ebfff Mon Sep 17 00:00:00 2001 From: Cory Fields Date: Wed, 24 Sep 2014 22:54:08 -0400 Subject: script: add ToByteVector() for converting anything with begin/end This should move to a util header once their dependencies are cleaned up. --- src/test/sigopcount_tests.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/test/sigopcount_tests.cpp') diff --git a/src/test/sigopcount_tests.cpp b/src/test/sigopcount_tests.cpp index 4ce2c87a0..7b27703b6 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); } -- cgit v1.2.3