Rename to `fCoinbaseMustBeProtected`.

This commit is contained in:
Sean Bowe 2016-06-14 15:16:34 -06:00
parent 89f3cd11c7
commit a180d0a6c6
3 changed files with 4 additions and 4 deletions

View File

@ -31,7 +31,7 @@ class CMainParams : public CChainParams {
public: public:
CMainParams() { CMainParams() {
strNetworkID = "main"; strNetworkID = "main";
consensus.coinbaseMustBeProtected = true; consensus.fCoinbaseMustBeProtected = true;
consensus.nSubsidySlowStartInterval = 20000; consensus.nSubsidySlowStartInterval = 20000;
consensus.nSubsidyHalvingInterval = 840000; consensus.nSubsidyHalvingInterval = 840000;
consensus.nMajorityEnforceBlockUpgrade = 750; consensus.nMajorityEnforceBlockUpgrade = 750;
@ -211,7 +211,7 @@ class CRegTestParams : public CTestNetParams {
public: public:
CRegTestParams() { CRegTestParams() {
strNetworkID = "regtest"; strNetworkID = "regtest";
consensus.coinbaseMustBeProtected = false; consensus.fCoinbaseMustBeProtected = false;
consensus.nSubsidySlowStartInterval = 0; consensus.nSubsidySlowStartInterval = 0;
consensus.nSubsidyHalvingInterval = 150; consensus.nSubsidyHalvingInterval = 150;
consensus.nMajorityEnforceBlockUpgrade = 750; consensus.nMajorityEnforceBlockUpgrade = 750;

View File

@ -15,7 +15,7 @@ namespace Consensus {
struct Params { struct Params {
uint256 hashGenesisBlock; uint256 hashGenesisBlock;
bool coinbaseMustBeProtected; bool fCoinbaseMustBeProtected;
/** Needs to evenly divide MAX_SUBSIDY to avoid rounding errors. */ /** Needs to evenly divide MAX_SUBSIDY to avoid rounding errors. */
int nSubsidySlowStartInterval; int nSubsidySlowStartInterval;

View File

@ -1631,7 +1631,7 @@ bool NonContextualCheckInputs(const CTransaction& tx, CValidationState &state, c
if (coins->IsCoinBase()) { if (coins->IsCoinBase()) {
// Ensure that coinbases cannot be spent to transparent outputs // Ensure that coinbases cannot be spent to transparent outputs
// Disabled on regtest // Disabled on regtest
if (consensusParams.coinbaseMustBeProtected && !tx.vout.empty()) { if (consensusParams.fCoinbaseMustBeProtected && !tx.vout.empty()) {
return state.Invalid( return state.Invalid(
error("CheckInputs(): tried to spend coinbase with transparent outputs"), error("CheckInputs(): tried to spend coinbase with transparent outputs"),
REJECT_INVALID, "bad-txns-coinbase-spend-has-transparent-outputs"); REJECT_INVALID, "bad-txns-coinbase-spend-has-transparent-outputs");