aboutsummaryrefslogtreecommitdiff
path: root/src/miner.cpp
diff options
context:
space:
mode:
authorGavin Andresen <[email protected]>2014-10-09 10:33:05 -0400
committerGavin Andresen <[email protected]>2014-10-09 10:39:29 -0400
commit3222802ea11053f0dd69c99fc2f33edff554dc17 (patch)
tree8db1800655df86b016a4a5ef042a855f321bde02 /src/miner.cpp
parentMerge pull request #4996 (diff)
parentTrigger -alertnotify if network is upgrading without you (diff)
downloaddiscoin-3222802ea11053f0dd69c99fc2f33edff554dc17.tar.xz
discoin-3222802ea11053f0dd69c99fc2f33edff554dc17.zip
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 <[email protected]>
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 fd6c52ca6..c2762bf44 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);