mirror of
https://github.com/kvazar-network/kevacoin.git
synced 2025-01-18 19:10:11 +00:00
Preserve tx version=1 for certain tests
Without this change, the tests would be affected by default tx version increases.
This commit is contained in:
parent
c5d746ace7
commit
dab207e4e6
@ -124,7 +124,11 @@ BOOST_AUTO_TEST_CASE(siphash)
|
|||||||
}
|
}
|
||||||
|
|
||||||
CHashWriter ss(SER_DISK, CLIENT_VERSION);
|
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);
|
BOOST_CHECK_EQUAL(SipHashUint256(1, 2, ss.GetHash()), 0x79751e980c2a0a35ULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -39,6 +39,7 @@ BOOST_FIXTURE_TEST_CASE(tx_mempool_block_doublespend, TestChain100Setup)
|
|||||||
spends.resize(2);
|
spends.resize(2);
|
||||||
for (int i = 0; i < 2; i++)
|
for (int i = 0; i < 2; i++)
|
||||||
{
|
{
|
||||||
|
spends[i].nVersion = 1;
|
||||||
spends[i].vin.resize(1);
|
spends[i].vin.resize(1);
|
||||||
spends[i].vin[0].prevout.hash = coinbaseTxns[0].GetHash();
|
spends[i].vin[0].prevout.hash = coinbaseTxns[0].GetHash();
|
||||||
spends[i].vin[0].prevout.n = 0;
|
spends[i].vin[0].prevout.n = 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user