aboutsummaryrefslogtreecommitdiff
path: root/src/consensus
diff options
context:
space:
mode:
authorRoss Nicoll <[email protected]>2018-01-08 19:39:10 +0000
committerRoss Nicoll <[email protected]>2018-09-19 21:09:16 +0100
commit7b81f4de0a006a6c01b88c79b6ab34a921eb86b5 (patch)
tree71f86cbdb71ef365ec893073d63f05ccfe1f8252 /src/consensus
parentCheck only the base block version (#1411) (diff)
downloaddiscoin-7b81f4de0a006a6c01b88c79b6ab34a921eb86b5.tar.xz
discoin-7b81f4de0a006a6c01b88c79b6ab34a921eb86b5.zip
Move COINBASE_MATURITY to the consensus parameters (#1426)
Diffstat (limited to 'src/consensus')
-rw-r--r--src/consensus/consensus.h4
-rw-r--r--src/consensus/params.h3
2 files changed, 2 insertions, 5 deletions
diff --git a/src/consensus/consensus.h b/src/consensus/consensus.h
index 2876abefb..b7053e869 100644
--- a/src/consensus/consensus.h
+++ b/src/consensus/consensus.h
@@ -18,10 +18,6 @@ static const unsigned int MAX_BLOCK_BASE_SIZE = 1000000;
static const int64_t MAX_BLOCK_SIGOPS_COST = 80000;
/** Coinbase transaction outputs can only be spent after this number of new blocks (network rule) */
static const int COINBASE_MATURITY = 60*4; // 4 hours of blocks
-/** Coinbase maturity before block 145000 **/
-static const int COINBASE_MATURITY_OLD = 30;
-/** Block at which COINBASE_MATURITY_OLD was deprecated **/
-static const int COINBASE_MATURITY_SWITCH = 145000;
/** Flags for nSequence and nLockTime locks */
enum {
diff --git a/src/consensus/params.h b/src/consensus/params.h
index a3a61747d..98c744149 100644
--- a/src/consensus/params.h
+++ b/src/consensus/params.h
@@ -43,7 +43,6 @@ struct Params {
int nMajorityEnforceBlockUpgrade;
int nMajorityRejectBlockOutdated;
int nMajorityWindow;
- int nCoinbaseMaturity;
/** Block height and hash at which BIP34 becomes active */
int BIP34Height;
uint256 BIP34Hash;
@@ -59,6 +58,7 @@ struct Params {
uint32_t nRuleChangeActivationThreshold;
uint32_t nMinerConfirmationWindow;
BIP9Deployment vDeployments[MAX_VERSION_BITS_DEPLOYMENTS];
+ uint32_t nCoinbaseMaturity;
/** Proof of work parameters */
uint256 powLimit;
bool fPowAllowMinDifficultyBlocks;
@@ -84,6 +84,7 @@ struct Params {
uint32_t nHeightEffective; // When these parameters come into use
struct Params *pLeft; // Left hand branch
struct Params *pRight; // Right hand branch
+ const Consensus::Params *GetConsensus(uint32_t nTargetHeight) const;
};
} // namespace Consensus