diff options
author | Mark Friedenbach <mark@friedenbach.org> | 2015-06-02 16:25:34 -0700 |
---|---|---|
committer | Mark Friedenbach <mark@friedenbach.org> | 2015-06-02 16:39:34 -0700 |
commit | efd44440d86ce416f41b48a01bcb471d0d92176c (patch) | |
tree | 44afb7a329b2e94aa204ac4b045cf108b0fc2bdc /src/test | |
parent | f00b62391b9317bf4c83676520fede1fb4027c43 (diff) |
Explicitly set tx.nVersion for the genesis block and mining tests
If/when CTransaction::CURRENT_VERSION is incremented, this will break CChainParams and the miner tests. This fix sets the transaction version explicitly where we depend on the hash value (genesis block, proof of work checks).
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/miner_tests.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/test/miner_tests.cpp b/src/test/miner_tests.cpp index e3e9061cce..393601d27d 100644 --- a/src/test/miner_tests.cpp +++ b/src/test/miner_tests.cpp @@ -74,6 +74,7 @@ BOOST_AUTO_TEST_CASE(CreateNewBlock_validity) pblock->nVersion = 1; pblock->nTime = chainActive.Tip()->GetMedianTimePast()+1; CMutableTransaction txCoinbase(pblock->vtx[0]); + txCoinbase.nVersion = 1; txCoinbase.vin[0].scriptSig = CScript(); txCoinbase.vin[0].scriptSig.push_back(blockinfo[i].extranonce); txCoinbase.vin[0].scriptSig.push_back(chainActive.Height()); |