aboutsummaryrefslogtreecommitdiff
path: root/src/miner.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/miner.cpp')
-rw-r--r--src/miner.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/miner.cpp b/src/miner.cpp
index fd6c52ca69..c2762bf44e 100644
--- a/src/miner.cpp
+++ b/src/miner.cpp
@@ -83,6 +83,11 @@ CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn)
return NULL;
CBlock *pblock = &pblocktemplate->block; // pointer for convenience
+ // -regtest only: allow overriding block.nVersion with
+ // -blockversion=N to test forking scenarios
+ if (Params().MineBlocksOnDemand())
+ pblock->nVersion = GetArg("-blockversion", pblock->nVersion);
+
// Create coinbase tx
CMutableTransaction txNew;
txNew.vin.resize(1);