diff options
| author | Wladimir J. van der Laan <[email protected]> | 2014-10-22 12:08:51 +0200 |
|---|---|---|
| committer | Wladimir J. van der Laan <[email protected]> | 2014-10-22 12:16:50 +0200 |
| commit | 25cc1cf8dc03b9ba0ae886d354855adc207b5b6e (patch) | |
| tree | 9298713771596e3ef2c45eb98b3564a995af7978 /src/test/sigopcount_tests.cpp | |
| parent | Merge pull request #4988 (diff) | |
| parent | script: add a slew of includes all around and drop includes from script.h (diff) | |
| download | discoin-25cc1cf8dc03b9ba0ae886d354855adc207b5b6e.tar.xz discoin-25cc1cf8dc03b9ba0ae886d354855adc207b5b6e.zip | |
Merge pull request #4981
85c579e script: add a slew of includes all around and drop includes from script.h (Cory Fields)
db8eb54 script: move ToString and ValueString out of the header (Cory Fields)
e9ca428 script: add ToByteVector() for converting anything with begin/end (Cory Fields)
066e2a1 script: move CScriptID to standard.h and add a ctor for creating them from CScripts (Cory Fields)
Diffstat (limited to 'src/test/sigopcount_tests.cpp')
| -rw-r--r-- | src/test/sigopcount_tests.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/test/sigopcount_tests.cpp b/src/test/sigopcount_tests.cpp index 62a6cd63d..7b27703b6 100644 --- a/src/test/sigopcount_tests.cpp +++ b/src/test/sigopcount_tests.cpp @@ -31,14 +31,14 @@ 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); BOOST_CHECK_EQUAL(s1.GetSigOpCount(false), 21U); - CScript p2sh = GetScriptForDestination(s1.GetID()); + CScript p2sh = GetScriptForDestination(CScriptID(s1)); CScript scriptSig; scriptSig << OP_0 << Serialize(s1); BOOST_CHECK_EQUAL(p2sh.GetSigOpCount(scriptSig), 3U); @@ -54,11 +54,11 @@ BOOST_AUTO_TEST_CASE(GetSigOpCount) BOOST_CHECK_EQUAL(s2.GetSigOpCount(true), 3U); BOOST_CHECK_EQUAL(s2.GetSigOpCount(false), 20U); - p2sh = GetScriptForDestination(s2.GetID()); + p2sh = GetScriptForDestination(CScriptID(s2)); 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); } |