mirror of
https://github.com/dashpay/dash.git
synced 2024-12-25 20:12:57 +01:00
Avoid introducing a virtual into CChainParams
Treat fSkipProofOfWorkCheck the same as other parameters.
This commit is contained in:
parent
f0fd00cb77
commit
fbd36d8fb5
@ -115,6 +115,7 @@ public:
|
||||
fAllowMinDifficultyBlocks = false;
|
||||
fRequireStandard = true;
|
||||
fMineBlocksOnDemand = false;
|
||||
fSkipProofOfWorkCheck = false;
|
||||
}
|
||||
};
|
||||
static CMainParams mainParams;
|
||||
@ -231,11 +232,7 @@ public:
|
||||
fDefaultCheckMemPool = true;
|
||||
fAllowMinDifficultyBlocks = false;
|
||||
fMineBlocksOnDemand = true;
|
||||
fSkipProofOfWorkCheck = false;
|
||||
}
|
||||
virtual bool SkipProofOfWorkCheck() const { return fSkipProofOfWorkCheck; }
|
||||
protected:
|
||||
bool fSkipProofOfWorkCheck;
|
||||
public:
|
||||
// Published setters to allow changing values in unit test cases
|
||||
virtual void setSubsidyHalvingInterval(int anSubsidyHalvingInterval) { nSubsidyHalvingInterval=anSubsidyHalvingInterval; }
|
||||
|
@ -62,7 +62,7 @@ public:
|
||||
/* Allow mining of a min-difficulty block */
|
||||
bool AllowMinDifficultyBlocks() const { return fAllowMinDifficultyBlocks; }
|
||||
/* Skip proof-of-work check: allow mining of any difficulty block */
|
||||
virtual bool SkipProofOfWorkCheck() const { return false; }
|
||||
bool SkipProofOfWorkCheck() const { return fSkipProofOfWorkCheck; }
|
||||
/* Make standard checks */
|
||||
bool RequireStandard() const { return fRequireStandard; }
|
||||
int64_t TargetTimespan() const { return nTargetTimespan; }
|
||||
@ -105,6 +105,7 @@ protected:
|
||||
bool fAllowMinDifficultyBlocks;
|
||||
bool fRequireStandard;
|
||||
bool fMineBlocksOnDemand;
|
||||
bool fSkipProofOfWorkCheck;
|
||||
};
|
||||
|
||||
/** Modifiable parameters interface is used by test cases to adapt the parameters in order
|
||||
|
Loading…
Reference in New Issue
Block a user