diff options
| author | BtcDrak <[email protected]> | 2016-12-07 20:22:07 +0000 |
|---|---|---|
| committer | BtcDrak <[email protected]> | 2016-12-08 20:11:51 +0000 |
| commit | dab207e4e694c6980336f59817d6c9af83a46fa2 (patch) | |
| tree | ebcec35326d2681f2595c855c66d1affd21beb6c /src/test/hash_tests.cpp | |
| parent | tiny test fix for mempool_tests (diff) | |
| download | discoin-dab207e4e694c6980336f59817d6c9af83a46fa2.tar.xz discoin-dab207e4e694c6980336f59817d6c9af83a46fa2.zip | |
Preserve tx version=1 for certain tests
Without this change, the tests would be affected by default
tx version increases.
Diffstat (limited to 'src/test/hash_tests.cpp')
| -rw-r--r-- | src/test/hash_tests.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/test/hash_tests.cpp b/src/test/hash_tests.cpp index fa9624f13..8be9c580c 100644 --- a/src/test/hash_tests.cpp +++ b/src/test/hash_tests.cpp @@ -124,7 +124,11 @@ BOOST_AUTO_TEST_CASE(siphash) } CHashWriter ss(SER_DISK, CLIENT_VERSION); - ss << CTransaction(); + CMutableTransaction tx; + // Note these tests were originally written with tx.nVersion=1 + // and the test would be affected by default tx version bumps if not fixed. + tx.nVersion = 1; + ss << tx; BOOST_CHECK_EQUAL(SipHashUint256(1, 2, ss.GetHash()), 0x79751e980c2a0a35ULL); } |