aboutsummaryrefslogtreecommitdiff
path: root/src/miner.cpp
diff options
context:
space:
mode:
authorGavin Andresen <gavinandresen@gmail.com>2014-10-09 10:33:05 -0400
committerGavin Andresen <gavinandresen@gmail.com>2014-10-09 10:39:29 -0400
commit3222802ea11053f0dd69c99fc2f33edff554dc17 (patch)
tree8db1800655df86b016a4a5ef042a855f321bde02 /src/miner.cpp
parentdec58922d07241f0b502c96f8e5131abccbd5dc1 (diff)
parentdbca89b74b76610331d21656cd6747f5bf8375d6 (diff)
Merge pull request #5059
dbca89b Trigger -alertnotify if network is upgrading without you (Gavin Andresen) e01a793 Refactor -alertnotify code (Gavin Andresen) Signed-off-by: Gavin Andresen <gavinandresen@gmail.com>
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);