constants. network. docs.
This commit is contained in:
parent
0cbc9b7338
commit
87d985fcdb
@ -2103,12 +2103,12 @@ Chain.prototype.getCurrentTarget = function getCurrentTarget(callback) {
|
|||||||
Chain.prototype.getTargetAsync = function getTargetAsync(last, block, callback) {
|
Chain.prototype.getTargetAsync = function getTargetAsync(last, block, callback) {
|
||||||
var self = this;
|
var self = this;
|
||||||
|
|
||||||
if ((last.height + 1) % network.pow.diffInterval !== 0) {
|
if ((last.height + 1) % network.pow.retargetInterval !== 0) {
|
||||||
if (!network.pow.allowMinDifficultyBlocks)
|
if (!network.pow.allowMinDifficultyBlocks)
|
||||||
return utils.asyncify(callback)(null, this.getTarget(last, block));
|
return utils.asyncify(callback)(null, this.getTarget(last, block));
|
||||||
}
|
}
|
||||||
|
|
||||||
return last.getAncestors(network.pow.diffInterval, function(err, ancestors) {
|
return last.getAncestors(network.pow.retargetInterval, function(err, ancestors) {
|
||||||
if (err)
|
if (err)
|
||||||
return callback(err);
|
return callback(err);
|
||||||
|
|
||||||
@ -2138,7 +2138,7 @@ Chain.prototype.getTarget = function getTarget(last, block, ancestors) {
|
|||||||
ancestors = last.ancestors;
|
ancestors = last.ancestors;
|
||||||
|
|
||||||
// Do not retarget
|
// Do not retarget
|
||||||
if ((last.height + 1) % network.pow.diffInterval !== 0) {
|
if ((last.height + 1) % network.pow.retargetInterval !== 0) {
|
||||||
if (network.pow.allowMinDifficultyBlocks) {
|
if (network.pow.allowMinDifficultyBlocks) {
|
||||||
// Special behavior for testnet:
|
// Special behavior for testnet:
|
||||||
ts = block ? (block.ts || block) : utils.now();
|
ts = block ? (block.ts || block) : utils.now();
|
||||||
@ -2147,7 +2147,7 @@ Chain.prototype.getTarget = function getTarget(last, block, ancestors) {
|
|||||||
|
|
||||||
i = 1;
|
i = 1;
|
||||||
while (ancestors[i]
|
while (ancestors[i]
|
||||||
&& last.height % network.pow.diffInterval !== 0
|
&& last.height % network.pow.retargetInterval !== 0
|
||||||
&& last.bits === powLimit) {
|
&& last.bits === powLimit) {
|
||||||
last = ancestors[i++];
|
last = ancestors[i++];
|
||||||
}
|
}
|
||||||
@ -2156,7 +2156,7 @@ Chain.prototype.getTarget = function getTarget(last, block, ancestors) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Back 2 weeks
|
// Back 2 weeks
|
||||||
first = ancestors[network.pow.diffInterval - 1];
|
first = ancestors[network.pow.retargetInterval - 1];
|
||||||
|
|
||||||
assert(first);
|
assert(first);
|
||||||
|
|
||||||
|
|||||||
@ -102,7 +102,7 @@ ChainBlock.prototype.isGenesis = function isGenesis() {
|
|||||||
ChainBlock.prototype.ensureAncestors = function ensureAncestors(callback) {
|
ChainBlock.prototype.ensureAncestors = function ensureAncestors(callback) {
|
||||||
var majorityWindow = network.block.majorityWindow;
|
var majorityWindow = network.block.majorityWindow;
|
||||||
var medianTimespan = constants.block.MEDIAN_TIMESPAN;
|
var medianTimespan = constants.block.MEDIAN_TIMESPAN;
|
||||||
var powDiffInterval = network.pow.diffInterval;
|
var powDiffInterval = network.pow.retargetInterval;
|
||||||
var allowMinDiff = network.pow.allowMinDifficultyBlocks;
|
var allowMinDiff = network.pow.allowMinDifficultyBlocks;
|
||||||
var max = Math.max(majorityWindow, medianTimespan);
|
var max = Math.max(majorityWindow, medianTimespan);
|
||||||
if ((this.height + 1) % powDiffInterval === 0 || allowMinDiff)
|
if ((this.height + 1) % powDiffInterval === 0 || allowMinDiff)
|
||||||
|
|||||||
@ -61,7 +61,7 @@ function ChainDB(chain, options) {
|
|||||||
// if we're going to be checking the damn
|
// if we're going to be checking the damn
|
||||||
// target all the time.
|
// target all the time.
|
||||||
if (network.pow.allowMinDifficultyBlocks)
|
if (network.pow.allowMinDifficultyBlocks)
|
||||||
this._cacheWindow = network.pow.diffInterval + 1;
|
this._cacheWindow = network.pow.retargetInterval + 1;
|
||||||
else
|
else
|
||||||
this._cacheWindow = network.block.majorityWindow + 1;
|
this._cacheWindow = network.block.majorityWindow + 1;
|
||||||
|
|
||||||
|
|||||||
@ -43,9 +43,28 @@ exports.MAX_MESSAGE = 4 * 1000 * 1000;
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
exports.services = {
|
exports.services = {
|
||||||
|
/**
|
||||||
|
* Whether network services are enabled.
|
||||||
|
*/
|
||||||
|
|
||||||
NETWORK: (1 << 0),
|
NETWORK: (1 << 0),
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Whether the peer supports the getutxos packet.
|
||||||
|
*/
|
||||||
|
|
||||||
GETUTXO: (1 << 1),
|
GETUTXO: (1 << 1),
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Whether the peer supports BIP37.
|
||||||
|
*/
|
||||||
|
|
||||||
BLOOM: (1 << 2),
|
BLOOM: (1 << 2),
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Whether the peer supports segregated witness.
|
||||||
|
*/
|
||||||
|
|
||||||
WITNESS: (1 << 3)
|
WITNESS: (1 << 3)
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -101,8 +120,23 @@ exports.WITNESS_MASK = 1 << 30;
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
exports.filterFlags = {
|
exports.filterFlags = {
|
||||||
|
/**
|
||||||
|
* Never update the filter with outpoints.
|
||||||
|
*/
|
||||||
|
|
||||||
NONE: 0,
|
NONE: 0,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Always update the filter with outpoints.
|
||||||
|
*/
|
||||||
|
|
||||||
ALL: 1,
|
ALL: 1,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Only update the filter with outpoints if it is
|
||||||
|
* "asymmetric" in terms of addresses (pubkey/multisig).
|
||||||
|
*/
|
||||||
|
|
||||||
PUBKEY_ONLY: 2
|
PUBKEY_ONLY: 2
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -303,9 +337,28 @@ exports.MAX_MONEY = new bn(21000000).mul(exports.COIN);
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
exports.hashType = {
|
exports.hashType = {
|
||||||
|
/**
|
||||||
|
* Sign all outputs.
|
||||||
|
*/
|
||||||
|
|
||||||
ALL: 1,
|
ALL: 1,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Do not sign outputs (zero sequences).
|
||||||
|
*/
|
||||||
|
|
||||||
NONE: 2,
|
NONE: 2,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sign output at the same index (zero sequences).
|
||||||
|
*/
|
||||||
|
|
||||||
SINGLE: 3,
|
SINGLE: 3,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sign only the current input (mask).
|
||||||
|
*/
|
||||||
|
|
||||||
ANYONECANPAY: 0x80
|
ANYONECANPAY: 0x80
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -384,9 +437,29 @@ exports.script = {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
exports.mempool = {
|
exports.mempool = {
|
||||||
|
/**
|
||||||
|
* Ancestor limit.
|
||||||
|
*/
|
||||||
|
|
||||||
ANCESTOR_LIMIT: 25,
|
ANCESTOR_LIMIT: 25,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Maximum mempool size in bytes.
|
||||||
|
*/
|
||||||
|
|
||||||
MAX_MEMPOOL_SIZE: 300 << 20,
|
MAX_MEMPOOL_SIZE: 300 << 20,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The time at which transactions
|
||||||
|
* fall out of the mempool.
|
||||||
|
*/
|
||||||
|
|
||||||
MEMPOOL_EXPIRY: 72 * 60 * 60,
|
MEMPOOL_EXPIRY: 72 * 60 * 60,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Maximum number of orphan transactions.
|
||||||
|
*/
|
||||||
|
|
||||||
MAX_ORPHAN_TX: 100
|
MAX_ORPHAN_TX: 100
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -452,9 +525,28 @@ exports.LOCKTIME_THRESHOLD = 500000000;
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
exports.sequence = {
|
exports.sequence = {
|
||||||
|
/**
|
||||||
|
* Highest nSequence bit (disables sequence locktimes).
|
||||||
|
*/
|
||||||
|
|
||||||
DISABLE_FLAG: (1 << 31) >>> 0,
|
DISABLE_FLAG: (1 << 31) >>> 0,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Type (height or time).
|
||||||
|
*/
|
||||||
|
|
||||||
TYPE_FLAG: 1 << 22,
|
TYPE_FLAG: 1 << 22,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sequence granularity.
|
||||||
|
*/
|
||||||
|
|
||||||
GRANULARITY: 9,
|
GRANULARITY: 9,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Mask.
|
||||||
|
*/
|
||||||
|
|
||||||
MASK: 0x0000ffff
|
MASK: 0x0000ffff
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -599,11 +691,22 @@ exports.flags.STANDARD_LOCKTIME_FLAGS = 0
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
exports.versionbits = {
|
exports.versionbits = {
|
||||||
// What block version to use for new blocks (pre versionbits)
|
/**
|
||||||
|
* What block version to use for new blocks (pre versionbits)
|
||||||
|
*/
|
||||||
|
|
||||||
LAST_OLD_BLOCK_VERSION: 4,
|
LAST_OLD_BLOCK_VERSION: 4,
|
||||||
// What bits to set in version for versionbits blocks
|
|
||||||
|
/**
|
||||||
|
* What bits to set in version for versionbits blocks
|
||||||
|
*/
|
||||||
|
|
||||||
TOP_BITS: 0x20000000,
|
TOP_BITS: 0x20000000,
|
||||||
// What bitmask determines whether versionbits is in use
|
|
||||||
|
/**
|
||||||
|
* What bitmask determines whether versionbits is in use
|
||||||
|
*/
|
||||||
|
|
||||||
TOP_MASK: 0xe0000000
|
TOP_MASK: 0xe0000000
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -628,9 +731,33 @@ exports.thresholdStates = {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
exports.confidence = {
|
exports.confidence = {
|
||||||
|
/**
|
||||||
|
* Transaction is in the main chain.
|
||||||
|
*/
|
||||||
|
|
||||||
BUILDING: 1,
|
BUILDING: 1,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Transaction is valid and in the mempool.
|
||||||
|
*/
|
||||||
|
|
||||||
PENDING: 2,
|
PENDING: 2,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Transaction is on a side chain.
|
||||||
|
*/
|
||||||
|
|
||||||
DEAD: 4,
|
DEAD: 4,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Transaction is double-spent.
|
||||||
|
*/
|
||||||
|
|
||||||
INCONFLICT: 5,
|
INCONFLICT: 5,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Transaction is not in the mempool or chain.
|
||||||
|
*/
|
||||||
|
|
||||||
UNKNOWN: 0
|
UNKNOWN: 0
|
||||||
};
|
};
|
||||||
|
|||||||
@ -169,33 +169,55 @@ main.genesisBlock =
|
|||||||
+ '61deb649f6bc3f4cef38c4f35504e51ec112de5c384df7ba0b8d578a4c702b6bf11d5f'
|
+ '61deb649f6bc3f4cef38c4f35504e51ec112de5c384df7ba0b8d578a4c702b6bf11d5f'
|
||||||
+ 'ac00000000';
|
+ 'ac00000000';
|
||||||
|
|
||||||
main.pow = {};
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Default target.
|
* POW-related constants.
|
||||||
* @const {Buffer}
|
* @enum {Number}
|
||||||
*/
|
|
||||||
|
|
||||||
main.pow.limit = new bn(
|
|
||||||
'00000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffff',
|
|
||||||
'hex'
|
|
||||||
);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Default retarget interval.
|
|
||||||
* @const {Number}
|
|
||||||
* @default
|
* @default
|
||||||
*/
|
*/
|
||||||
|
|
||||||
main.pow.targetTimespan = 14 * 24 * 60 * 60; // two weeks
|
main.pow = {
|
||||||
|
/**
|
||||||
|
* Default target.
|
||||||
|
* @const {Buffer}
|
||||||
|
*/
|
||||||
|
|
||||||
/**
|
limit: new bn(
|
||||||
* Average block time.
|
'00000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffff',
|
||||||
* @const {Number}
|
'hex'
|
||||||
* @default
|
),
|
||||||
*/
|
|
||||||
|
|
||||||
main.pow.targetSpacing = 10 * 60;
|
/**
|
||||||
|
* Default retarget interval.
|
||||||
|
* @const {Number}
|
||||||
|
* @default
|
||||||
|
*/
|
||||||
|
|
||||||
|
targetTimespan: 14 * 24 * 60 * 60, // two weeks
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Average block time.
|
||||||
|
* @const {Number}
|
||||||
|
* @default
|
||||||
|
*/
|
||||||
|
|
||||||
|
targetSpacing: 10 * 60,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Allow constant retargetting on testnet.
|
||||||
|
* @const {Boolean}
|
||||||
|
* @default
|
||||||
|
*/
|
||||||
|
|
||||||
|
allowMinDifficultyBlocks: false,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Do not allow retargetting.
|
||||||
|
* @const {Boolean}
|
||||||
|
* @default
|
||||||
|
*/
|
||||||
|
|
||||||
|
noRetargeting: false
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retarget interval in blocks.
|
* Retarget interval in blocks.
|
||||||
@ -203,21 +225,7 @@ main.pow.targetSpacing = 10 * 60;
|
|||||||
* @default
|
* @default
|
||||||
*/
|
*/
|
||||||
|
|
||||||
main.pow.diffInterval = main.pow.targetTimespan / main.pow.targetSpacing | 0;
|
main.pow.retargetInterval = main.pow.targetTimespan / main.pow.targetSpacing | 0;
|
||||||
|
|
||||||
/**
|
|
||||||
* @const {Boolean}
|
|
||||||
* @default
|
|
||||||
*/
|
|
||||||
|
|
||||||
main.pow.allowMinDifficultyBlocks = false;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @const {Boolean}
|
|
||||||
* @default
|
|
||||||
*/
|
|
||||||
|
|
||||||
main.pow.noRetargeting = false;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Block constants.
|
* Block constants.
|
||||||
@ -226,12 +234,50 @@ main.pow.noRetargeting = false;
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
main.block = {
|
main.block = {
|
||||||
|
/**
|
||||||
|
* Required versions to upgrade (see {@link ChainBlock#IsUpgraded}).
|
||||||
|
*/
|
||||||
|
|
||||||
majorityEnforceUpgrade: 750,
|
majorityEnforceUpgrade: 750,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Required versions to consider block
|
||||||
|
* outdated (see {@link ChainBlock#IsOutdated}).
|
||||||
|
*/
|
||||||
|
|
||||||
majorityRejectOutdated: 950,
|
majorityRejectOutdated: 950,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Majority window to check for upgraded and outdated
|
||||||
|
* blocks (see {@link ChainBlock#IsSuperMajority}).
|
||||||
|
*/
|
||||||
|
|
||||||
majorityWindow: 1000,
|
majorityWindow: 1000,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Height at which bip34 was activated.
|
||||||
|
* Used for avoiding bip30 checks.
|
||||||
|
*/
|
||||||
|
|
||||||
bip34height: 227931,
|
bip34height: 227931,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Hash of the block that activated bip34.
|
||||||
|
*/
|
||||||
|
|
||||||
bip34hash: 'b808089c756add1591b1d17bab44bba3fed9e02f942ab4894b02000000000000',
|
bip34hash: 'b808089c756add1591b1d17bab44bba3fed9e02f942ab4894b02000000000000',
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Safe height to start pruning.
|
||||||
|
*/
|
||||||
|
|
||||||
pruneAfterHeight: 100000,
|
pruneAfterHeight: 100000,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Age used for the time delta to
|
||||||
|
* determine whether the chain is synced.
|
||||||
|
*/
|
||||||
|
|
||||||
maxTipAge: 24 * 60 * 60
|
maxTipAge: 24 * 60 * 60
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -312,26 +358,27 @@ main.prefixes = {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* {@link Base58Address} constants.
|
* {@link Base58Address} constants.
|
||||||
* @const {Object}
|
* @enum {Object}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
main.address = {
|
main.address = {
|
||||||
/**
|
/**
|
||||||
* {@link Base58Address} prefixes.
|
* {@link Base58Address} prefixes.
|
||||||
* @enum {Number}
|
* @enum {Number}
|
||||||
* @default
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
prefixes: {
|
prefixes: {
|
||||||
pubkeyhash: 0,
|
pubkeyhash: 0,
|
||||||
scripthash: 5,
|
scripthash: 5,
|
||||||
witnesspubkeyhash: 6,
|
witnesspubkeyhash: 6,
|
||||||
witnessscripthash: 10
|
witnessscripthash: 10
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@link Base58Address} versions.
|
* {@link Base58Address} versions.
|
||||||
* @enum {Number}
|
* @enum {Number}
|
||||||
* @default
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
versions: {
|
versions: {
|
||||||
witnesspubkeyhash: 0,
|
witnesspubkeyhash: 0,
|
||||||
witnessscripthash: 0
|
witnessscripthash: 0
|
||||||
@ -415,17 +462,18 @@ testnet.genesisBlock =
|
|||||||
+ '61deb649f6bc3f4cef38c4f35504e51ec112de5c384df7ba0b8d578a4c702b6bf11d5f'
|
+ '61deb649f6bc3f4cef38c4f35504e51ec112de5c384df7ba0b8d578a4c702b6bf11d5f'
|
||||||
+ 'ac00000000';
|
+ 'ac00000000';
|
||||||
|
|
||||||
testnet.pow = {};
|
testnet.pow = {
|
||||||
|
limit: new bn(
|
||||||
|
'00000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffff',
|
||||||
|
'hex'
|
||||||
|
),
|
||||||
|
targetTimespan: 14 * 24 * 60 * 60, // two weeks
|
||||||
|
targetSpacing: 10 * 60,
|
||||||
|
allowMinDifficultyBlocks: true,
|
||||||
|
noRetargeting: false
|
||||||
|
};
|
||||||
|
|
||||||
testnet.pow.limit = new bn(
|
testnet.pow.retargetInterval = testnet.pow.targetTimespan / testnet.pow.targetSpacing | 0;
|
||||||
'00000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffff',
|
|
||||||
'hex'
|
|
||||||
);
|
|
||||||
testnet.pow.targetTimespan = 14 * 24 * 60 * 60; // two weeks
|
|
||||||
testnet.pow.targetSpacing = 10 * 60;
|
|
||||||
testnet.pow.diffInterval = testnet.pow.targetTimespan / testnet.pow.targetSpacing | 0;
|
|
||||||
testnet.pow.allowMinDifficultyBlocks = true;
|
|
||||||
testnet.pow.noRetargeting = false;
|
|
||||||
|
|
||||||
testnet.block = {
|
testnet.block = {
|
||||||
majorityEnforceUpgrade: 51,
|
majorityEnforceUpgrade: 51,
|
||||||
@ -541,15 +589,18 @@ regtest.genesisBlock =
|
|||||||
|
|
||||||
regtest.pow = {};
|
regtest.pow = {};
|
||||||
|
|
||||||
regtest.pow.limit = new bn(
|
regtest.pow = {
|
||||||
'7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff',
|
limit: new bn(
|
||||||
'hex'
|
'7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff',
|
||||||
);
|
'hex'
|
||||||
regtest.pow.targetTimespan = 14 * 24 * 60 * 60; // two weeks
|
),
|
||||||
regtest.pow.targetSpacing = 10 * 60;
|
targetTimespan: 14 * 24 * 60 * 60, // two weeks
|
||||||
regtest.pow.diffInterval = regtest.pow.targetTimespan / regtest.pow.targetSpacing | 0;
|
targetSpacing: 10 * 60,
|
||||||
regtest.pow.allowMinDifficultyBlocks = true;
|
allowMinDifficultyBlocks: true,
|
||||||
regtest.pow.noRetargeting = true;
|
noRetargeting: true
|
||||||
|
};
|
||||||
|
|
||||||
|
regtest.pow.retargetInterval = regtest.pow.targetTimespan / regtest.pow.targetSpacing | 0;
|
||||||
|
|
||||||
regtest.block = {
|
regtest.block = {
|
||||||
majorityEnforceUpgrade: 750,
|
majorityEnforceUpgrade: 750,
|
||||||
@ -662,17 +713,18 @@ segnet3.genesisBlock =
|
|||||||
+ '61deb649f6bc3f4cef38c4f35504e51ec112de5c384df7ba0b8d578a4c702b6bf11d5f'
|
+ '61deb649f6bc3f4cef38c4f35504e51ec112de5c384df7ba0b8d578a4c702b6bf11d5f'
|
||||||
+ 'ac00000000';
|
+ 'ac00000000';
|
||||||
|
|
||||||
segnet3.pow = {};
|
segnet3.pow = {
|
||||||
|
limit: new bn(
|
||||||
|
'00000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffff',
|
||||||
|
'hex'
|
||||||
|
),
|
||||||
|
targetTimespan: 14 * 24 * 60 * 60, // two weeks
|
||||||
|
targetSpacing: 10 * 60,
|
||||||
|
allowMinDifficultyBlocks: true,
|
||||||
|
noRetargeting: false
|
||||||
|
};
|
||||||
|
|
||||||
segnet3.pow.limit = new bn(
|
segnet3.pow.retargetInterval = segnet3.pow.targetTimespan / segnet3.pow.targetSpacing | 0;
|
||||||
'00000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffff',
|
|
||||||
'hex'
|
|
||||||
);
|
|
||||||
segnet3.pow.targetTimespan = 14 * 24 * 60 * 60; // two weeks
|
|
||||||
segnet3.pow.targetSpacing = 10 * 60;
|
|
||||||
segnet3.pow.diffInterval = segnet3.pow.targetTimespan / segnet3.pow.targetSpacing | 0;
|
|
||||||
segnet3.pow.allowMinDifficultyBlocks = true;
|
|
||||||
segnet3.pow.noRetargeting = false;
|
|
||||||
|
|
||||||
segnet3.block = {
|
segnet3.block = {
|
||||||
majorityEnforceUpgrade: 7,
|
majorityEnforceUpgrade: 7,
|
||||||
@ -766,18 +818,19 @@ segnet4.genesisBlock =
|
|||||||
+ '61deb649f6bc3f4cef38c4f35504e51ec112de5c384df7ba0b8d578a4c702b6bf11d5f'
|
+ '61deb649f6bc3f4cef38c4f35504e51ec112de5c384df7ba0b8d578a4c702b6bf11d5f'
|
||||||
+ 'ac00000000';
|
+ 'ac00000000';
|
||||||
|
|
||||||
segnet4.pow = {};
|
segnet4.pow = {
|
||||||
|
|
||||||
segnet4.pow.limit = new bn(
|
|
||||||
// 512x lower min difficulty than mainnet
|
// 512x lower min difficulty than mainnet
|
||||||
'000001ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff',
|
limit: new bn(
|
||||||
'hex'
|
'000001ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff',
|
||||||
);
|
'hex'
|
||||||
segnet4.pow.targetTimespan = 14 * 24 * 60 * 60; // two weeks
|
),
|
||||||
segnet4.pow.targetSpacing = 10 * 60;
|
targetTimespan: 14 * 24 * 60 * 60, // two weeks
|
||||||
segnet4.pow.diffInterval = segnet4.pow.targetTimespan / segnet4.pow.targetSpacing | 0;
|
targetSpacing: 10 * 60,
|
||||||
segnet4.pow.allowMinDifficultyBlocks = true;
|
allowMinDifficultyBlocks: true,
|
||||||
segnet4.pow.noRetargeting = false;
|
noRetargeting: false
|
||||||
|
};
|
||||||
|
|
||||||
|
segnet4.pow.retargetInterval = segnet4.pow.targetTimespan / segnet4.pow.targetSpacing | 0;
|
||||||
|
|
||||||
segnet4.block = {
|
segnet4.block = {
|
||||||
majorityEnforceUpgrade: 7,
|
majorityEnforceUpgrade: 7,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user