Major updates integration from all upstreams
This commit is contained in:
@@ -10,16 +10,21 @@
|
||||
static const int32_t MIN_BLOCK_VERSION = 4;
|
||||
/** The minimum allowed transaction version (network rule) */
|
||||
static const int32_t SPROUT_MIN_TX_VERSION = 1;
|
||||
/** The minimum allowed transaction version (network rule) */
|
||||
/** The minimum allowed Overwinter transaction version (network rule) */
|
||||
static const int32_t OVERWINTER_MIN_TX_VERSION = 3;
|
||||
/** The maximum allowed transaction version (network rule) */
|
||||
/** The maximum allowed Overwinter transaction version (network rule) */
|
||||
static const int32_t OVERWINTER_MAX_TX_VERSION = 3;
|
||||
/** The minimum allowed Sapling transaction version (network rule) */
|
||||
static const int32_t SAPLING_MIN_TX_VERSION = 4;
|
||||
/** The maximum allowed Sapling transaction version (network rule) */
|
||||
static const int32_t SAPLING_MAX_TX_VERSION = 4;
|
||||
/** The maximum allowed size for a serialized block, in bytes (network rule) */
|
||||
static const unsigned int MAX_BLOCK_SIZE = 2000000;
|
||||
/** The maximum allowed number of signature check operations in a block (network rule) */
|
||||
extern unsigned int MAX_BLOCK_SIGOPS;
|
||||
/** The maximum size of a transaction (network rule) */
|
||||
static const unsigned int MAX_TX_SIZE = 100000;
|
||||
static const unsigned int MAX_TX_SIZE_BEFORE_SAPLING = 100000;
|
||||
static const unsigned int MAX_TX_SIZE_AFTER_SAPLING = MAX_BLOCK_SIZE;
|
||||
/** Coinbase transaction outputs can only be spent after this number of new blocks (network rule) */
|
||||
extern int COINBASE_MATURITY;
|
||||
/** The minimum value which is invalid for expiry height, used by CTransaction and CMutableTransaction */
|
||||
|
||||
@@ -23,6 +23,7 @@ enum UpgradeIndex {
|
||||
BASE_SPROUT,
|
||||
UPGRADE_TESTDUMMY,
|
||||
UPGRADE_OVERWINTER,
|
||||
UPGRADE_SAPLING,
|
||||
// NOTE: Also add new upgrades to NetworkUpgradeInfo in upgrades.cpp
|
||||
MAX_NETWORK_UPGRADES
|
||||
};
|
||||
@@ -111,6 +112,7 @@ struct Params {
|
||||
int64_t AveragingWindowTimespan() const { return nPowAveragingWindow * nPowTargetSpacing; }
|
||||
int64_t MinActualTimespan() const { return (AveragingWindowTimespan() * (100 - nPowMaxAdjustUp )) / 100; }
|
||||
int64_t MaxActualTimespan() const { return (AveragingWindowTimespan() * (100 + nPowMaxAdjustDown)) / 100; }
|
||||
uint256 nMinimumChainWork;
|
||||
};
|
||||
} // namespace Consensus
|
||||
|
||||
|
||||
@@ -23,6 +23,11 @@ const struct NUInfo NetworkUpgradeInfo[Consensus::MAX_NETWORK_UPGRADES] = {
|
||||
/*.nBranchId =*/ 0x5ba81b19,
|
||||
/*.strName =*/ "Overwinter",
|
||||
/*.strInfo =*/ "See https://z.cash/upgrade/overwinter.html for details.",
|
||||
},
|
||||
{
|
||||
/*.nBranchId =*/ 0x76b809bb,
|
||||
/*.strName =*/ "Sapling",
|
||||
/*.strInfo =*/ "See https://z.cash/upgrade/sapling.html for details.",
|
||||
}
|
||||
};
|
||||
|
||||
@@ -69,6 +74,8 @@ int CurrentEpoch(int nHeight, const Consensus::Params& params) {
|
||||
return idxInt;
|
||||
}
|
||||
}
|
||||
// Base case
|
||||
return Consensus::BASE_SPROUT;
|
||||
}
|
||||
|
||||
uint32_t CurrentEpochBranchId(int nHeight, const Consensus::Params& params) {
|
||||
|
||||
Reference in New Issue
Block a user