aboutsummaryrefslogtreecommitdiff
path: root/src/chainparams.cpp
diff options
context:
space:
mode:
authorMark Friedenbach <[email protected]>2015-06-02 16:25:34 -0700
committerMark Friedenbach <[email protected]>2015-06-02 16:39:34 -0700
commitefd44440d86ce416f41b48a01bcb471d0d92176c (patch)
tree44afb7a329b2e94aa204ac4b045cf108b0fc2bdc /src/chainparams.cpp
parentMerge pull request #6203 (diff)
downloaddiscoin-efd44440d86ce416f41b48a01bcb471d0d92176c.tar.xz
discoin-efd44440d86ce416f41b48a01bcb471d0d92176c.zip
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/chainparams.cpp')
-rw-r--r--src/chainparams.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/chainparams.cpp b/src/chainparams.cpp
index 5f400b265..778541751 100644
--- a/src/chainparams.cpp
+++ b/src/chainparams.cpp
@@ -66,6 +66,7 @@ public:
*/
const char* pszTimestamp = "The Times 03/Jan/2009 Chancellor on brink of second bailout for banks";
CMutableTransaction txNew;
+ txNew.nVersion = 1;
txNew.vin.resize(1);
txNew.vout.resize(1);
txNew.vin[0].scriptSig = CScript() << 486604799 << CScriptNum(4) << vector<unsigned char>((const unsigned char*)pszTimestamp, (const unsigned char*)pszTimestamp + strlen(pszTimestamp));