diff options
| author | Ben Woosley <[email protected]> | 2018-12-02 01:56:12 -0800 |
|---|---|---|
| committer | Ben Woosley <[email protected]> | 2019-01-03 09:10:27 -0800 |
| commit | 75778a0724b73a0cecd99bd2e1c49fbfdb90e194 (patch) | |
| tree | cb2aca429692e38b6edb2909238068f09de2971c /src/test/transaction_tests.cpp | |
| parent | Merge #13966: gui: When private key is disabled, only show watch-only balance (diff) | |
| download | discoin-75778a0724b73a0cecd99bd2e1c49fbfdb90e194.tar.xz discoin-75778a0724b73a0cecd99bd2e1c49fbfdb90e194.zip | |
test: Correct ineffectual WithOrVersion from transactions_tests
WithOrVersion uses | to combine the versions, and | with 0 is a no-op.
Instead I run it with PROTOCOL_VERSION and 0 separately, as the original
code only tested PROTOCOL_VERSION but apparently only intended to test
version 0.
Introduced in ab48c5e72156b34300db4a6521cb3c9969be3937
Last updated 81e3228fcb33e8ed32d8b9fbe917444ba080073a
Diffstat (limited to 'src/test/transaction_tests.cpp')
| -rw-r--r-- | src/test/transaction_tests.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/test/transaction_tests.cpp b/src/test/transaction_tests.cpp index 9978c7166..11d3b1a96 100644 --- a/src/test/transaction_tests.cpp +++ b/src/test/transaction_tests.cpp @@ -414,7 +414,8 @@ static void ReplaceRedeemScript(CScript& script, const CScript& redeemScript) script = PushAll(stack); } -BOOST_AUTO_TEST_CASE(test_big_witness_transaction) { +BOOST_AUTO_TEST_CASE(test_big_witness_transaction) +{ CMutableTransaction mtx; mtx.nVersion = 1; @@ -456,9 +457,8 @@ BOOST_AUTO_TEST_CASE(test_big_witness_transaction) { } CDataStream ssout(SER_NETWORK, PROTOCOL_VERSION); - auto vstream = WithOrVersion(&ssout, 0); - vstream << mtx; - CTransaction tx(deserialize, vstream); + ssout << mtx; + CTransaction tx(deserialize, ssout); // check all inputs concurrently, with the cache PrecomputedTransactionData txdata(tx); |