Skip to content

Commit fa613ca

Browse files
author
MarcoFalke
committed
chainparams: Remove unused fMineBlocksOnDemand
It is equal to consensus.fPowNoRetargeting
1 parent 6c9d3c7 commit fa613ca

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

src/chainparams.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,6 @@ class CMainParams : public CChainParams {
141141

142142
fDefaultConsistencyChecks = false;
143143
fRequireStandard = true;
144-
fMineBlocksOnDemand = false;
145144

146145
checkpointData = {
147146
{
@@ -247,7 +246,6 @@ class CTestNetParams : public CChainParams {
247246

248247
fDefaultConsistencyChecks = false;
249248
fRequireStandard = false;
250-
fMineBlocksOnDemand = false;
251249

252250

253251
checkpointData = {
@@ -325,7 +323,6 @@ class CRegTestParams : public CChainParams {
325323

326324
fDefaultConsistencyChecks = true;
327325
fRequireStandard = false;
328-
fMineBlocksOnDemand = true;
329326

330327
checkpointData = {
331328
{

src/chainparams.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@ class CChainParams
7171
uint64_t AssumedBlockchainSize() const { return m_assumed_blockchain_size; }
7272
/** Minimum free space (in GB) needed for data directory when pruned; Does not include prune target*/
7373
uint64_t AssumedChainStateSize() const { return m_assumed_chain_state_size; }
74-
/** Make miner stop after a block is found. In RPC, don't return until nGenProcLimit blocks are generated */
75-
bool MineBlocksOnDemand() const { return fMineBlocksOnDemand; }
74+
/** Whether it is possible to mine blocks on demand (no retargeting) */
75+
bool MineBlocksOnDemand() const { return consensus.fPowNoRetargeting; }
7676
/** Return the BIP70 network string (main, test or regtest) */
7777
std::string NetworkIDString() const { return strNetworkID; }
7878
/** Return true if the fallback fee is by default enabled for this network */
@@ -101,7 +101,6 @@ class CChainParams
101101
std::vector<SeedSpec6> vFixedSeeds;
102102
bool fDefaultConsistencyChecks;
103103
bool fRequireStandard;
104-
bool fMineBlocksOnDemand;
105104
CCheckpointData checkpointData;
106105
ChainTxData chainTxData;
107106
bool m_fallback_fee_enabled;

0 commit comments

Comments
 (0)