Skip to content

Commit 9c93ee5

Browse files
committed
Merge pull request #6222
efd4444 Explicitly set tx.nVersion for the genesis block and mining tests (Mark Friedenbach)
2 parents d9a94b7 + efd4444 commit 9c93ee5

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

src/chainparams.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ class CMainParams : public CChainParams {
6666
*/
6767
const char* pszTimestamp = "The Times 03/Jan/2009 Chancellor on brink of second bailout for banks";
6868
CMutableTransaction txNew;
69+
txNew.nVersion = 1;
6970
txNew.vin.resize(1);
7071
txNew.vout.resize(1);
7172
txNew.vin[0].scriptSig = CScript() << 486604799 << CScriptNum(4) << vector<unsigned char>((const unsigned char*)pszTimestamp, (const unsigned char*)pszTimestamp + strlen(pszTimestamp));

src/test/miner_tests.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ BOOST_AUTO_TEST_CASE(CreateNewBlock_validity)
7474
pblock->nVersion = 1;
7575
pblock->nTime = chainActive.Tip()->GetMedianTimePast()+1;
7676
CMutableTransaction txCoinbase(pblock->vtx[0]);
77+
txCoinbase.nVersion = 1;
7778
txCoinbase.vin[0].scriptSig = CScript();
7879
txCoinbase.vin[0].scriptSig.push_back(blockinfo[i].extranonce);
7980
txCoinbase.vin[0].scriptSig.push_back(chainActive.Height());

0 commit comments

Comments
 (0)