Rename to `fCoinbaseMustBeProtected`.
This commit is contained in:
parent
89f3cd11c7
commit
a180d0a6c6
|
@ -31,7 +31,7 @@ class CMainParams : public CChainParams {
|
|||
public:
|
||||
CMainParams() {
|
||||
strNetworkID = "main";
|
||||
consensus.coinbaseMustBeProtected = true;
|
||||
consensus.fCoinbaseMustBeProtected = true;
|
||||
consensus.nSubsidySlowStartInterval = 20000;
|
||||
consensus.nSubsidyHalvingInterval = 840000;
|
||||
consensus.nMajorityEnforceBlockUpgrade = 750;
|
||||
|
@ -211,7 +211,7 @@ class CRegTestParams : public CTestNetParams {
|
|||
public:
|
||||
CRegTestParams() {
|
||||
strNetworkID = "regtest";
|
||||
consensus.coinbaseMustBeProtected = false;
|
||||
consensus.fCoinbaseMustBeProtected = false;
|
||||
consensus.nSubsidySlowStartInterval = 0;
|
||||
consensus.nSubsidyHalvingInterval = 150;
|
||||
consensus.nMajorityEnforceBlockUpgrade = 750;
|
||||
|
|
|
@ -15,7 +15,7 @@ namespace Consensus {
|
|||
struct Params {
|
||||
uint256 hashGenesisBlock;
|
||||
|
||||
bool coinbaseMustBeProtected;
|
||||
bool fCoinbaseMustBeProtected;
|
||||
|
||||
/** Needs to evenly divide MAX_SUBSIDY to avoid rounding errors. */
|
||||
int nSubsidySlowStartInterval;
|
||||
|
|
|
@ -1631,7 +1631,7 @@ bool NonContextualCheckInputs(const CTransaction& tx, CValidationState &state, c
|
|||
if (coins->IsCoinBase()) {
|
||||
// Ensure that coinbases cannot be spent to transparent outputs
|
||||
// Disabled on regtest
|
||||
if (consensusParams.coinbaseMustBeProtected && !tx.vout.empty()) {
|
||||
if (consensusParams.fCoinbaseMustBeProtected && !tx.vout.empty()) {
|
||||
return state.Invalid(
|
||||
error("CheckInputs(): tried to spend coinbase with transparent outputs"),
|
||||
REJECT_INVALID, "bad-txns-coinbase-spend-has-transparent-outputs");
|
||||
|
|
Loading…
Reference in New Issue