constants.
This commit is contained in:
parent
dee60da2e2
commit
0cbc9b7338
@ -333,6 +333,8 @@ exports.block = {
|
|||||||
/**
|
/**
|
||||||
* Map of historical blocks which create duplicate transactions hashes.
|
* Map of historical blocks which create duplicate transactions hashes.
|
||||||
* @see https://github.com/bitcoin/bips/blob/master/bip-0030.mediawiki
|
* @see https://github.com/bitcoin/bips/blob/master/bip-0030.mediawiki
|
||||||
|
* @const {Object}
|
||||||
|
* @default
|
||||||
*/
|
*/
|
||||||
|
|
||||||
exports.bip30 = {
|
exports.bip30 = {
|
||||||
@ -375,40 +377,18 @@ exports.script = {
|
|||||||
MAX_OP_RETURN: 80
|
MAX_OP_RETURN: 80
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.mempool = {};
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Ancestor limit.
|
* Mempool-related constants.
|
||||||
* @const {Number}
|
* @enum {Number}
|
||||||
* @default
|
* @default
|
||||||
*/
|
*/
|
||||||
|
|
||||||
exports.mempool.ANCESTOR_LIMIT = 25;
|
exports.mempool = {
|
||||||
|
ANCESTOR_LIMIT: 25,
|
||||||
/**
|
MAX_MEMPOOL_SIZE: 300 << 20,
|
||||||
* Maximum mempool size in bytes.
|
MEMPOOL_EXPIRY: 72 * 60 * 60,
|
||||||
* @const {Number}
|
MAX_ORPHAN_TX: 100
|
||||||
* @default
|
};
|
||||||
*/
|
|
||||||
|
|
||||||
exports.mempool.MAX_MEMPOOL_SIZE = 300 << 20;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The time at which transactions
|
|
||||||
* fall out of the mempool.
|
|
||||||
* @const {Number}
|
|
||||||
* @default
|
|
||||||
*/
|
|
||||||
|
|
||||||
exports.mempool.MEMPOOL_EXPIRY = 72 * 60 * 60;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Maximum number of orphan transactions.
|
|
||||||
* @const {Number}
|
|
||||||
* @default
|
|
||||||
*/
|
|
||||||
|
|
||||||
exports.mempool.MAX_ORPHAN_TX = 100;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Reject codes. Note that `internal` and higher
|
* Reject codes. Note that `internal` and higher
|
||||||
@ -465,35 +445,18 @@ exports.hd = {
|
|||||||
|
|
||||||
exports.LOCKTIME_THRESHOLD = 500000000;
|
exports.LOCKTIME_THRESHOLD = 500000000;
|
||||||
|
|
||||||
exports.sequence = {};
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Highest nSequence bit (disables sequence locktimes).
|
* Sequence locktime-related constants.
|
||||||
* @const {Number}
|
* @enum {Number}
|
||||||
*/
|
|
||||||
|
|
||||||
exports.sequence.DISABLE_FLAG = (1 << 31) >>> 0;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @const {Number}
|
|
||||||
* @default
|
* @default
|
||||||
*/
|
*/
|
||||||
|
|
||||||
exports.sequence.TYPE_FLAG = 1 << 22;
|
exports.sequence = {
|
||||||
|
DISABLE_FLAG: (1 << 31) >>> 0,
|
||||||
/**
|
TYPE_FLAG: 1 << 22,
|
||||||
* @const {Number}
|
GRANULARITY: 9,
|
||||||
* @default
|
MASK: 0x0000ffff
|
||||||
*/
|
};
|
||||||
|
|
||||||
exports.sequence.GRANULARITY = 9;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @const {Number}
|
|
||||||
* @default
|
|
||||||
*/
|
|
||||||
|
|
||||||
exports.sequence.MASK = 0x0000ffff;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A hash of all zeroes with a `1` at the
|
* A hash of all zeroes with a `1` at the
|
||||||
@ -597,8 +560,8 @@ exports.flags.MANDATORY_VERIFY_FLAGS = exports.flags.VERIFY_P2SH;
|
|||||||
* @default
|
* @default
|
||||||
*/
|
*/
|
||||||
|
|
||||||
exports.flags.STANDARD_VERIFY_FLAGS =
|
exports.flags.STANDARD_VERIFY_FLAGS = 0
|
||||||
exports.flags.MANDATORY_VERIFY_FLAGS
|
| exports.flags.MANDATORY_VERIFY_FLAGS
|
||||||
| exports.flags.VERIFY_DERSIG
|
| exports.flags.VERIFY_DERSIG
|
||||||
| exports.flags.VERIFY_STRICTENC
|
| exports.flags.VERIFY_STRICTENC
|
||||||
| exports.flags.VERIFY_MINIMALDATA
|
| exports.flags.VERIFY_MINIMALDATA
|
||||||
@ -607,9 +570,9 @@ exports.flags.STANDARD_VERIFY_FLAGS =
|
|||||||
| exports.flags.VERIFY_CLEANSTACK
|
| exports.flags.VERIFY_CLEANSTACK
|
||||||
| exports.flags.VERIFY_CHECKLOCKTIMEVERIFY
|
| exports.flags.VERIFY_CHECKLOCKTIMEVERIFY
|
||||||
| exports.flags.VERIFY_LOW_S
|
| exports.flags.VERIFY_LOW_S
|
||||||
| exports.flags.VERIFY_CHECKSEQUENCEVERIFY;
|
| exports.flags.VERIFY_CHECKSEQUENCEVERIFY
|
||||||
// | exports.flags.VERIFY_WITNESS
|
| exports.flags.VERIFY_WITNESS
|
||||||
// | exports.flags.VERIFY_DISCOURAGE_UPGRADABLE_WITNESS_PROGRAM
|
| exports.flags.VERIFY_DISCOURAGE_UPGRADABLE_WITNESS_PROGRAM;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Consensus locktime flags (used for block validation).
|
* Consensus locktime flags (used for block validation).
|
||||||
@ -625,8 +588,8 @@ exports.flags.MANDATORY_LOCKTIME_FLAGS = 0;
|
|||||||
* @default
|
* @default
|
||||||
*/
|
*/
|
||||||
|
|
||||||
exports.flags.STANDARD_LOCKTIME_FLAGS =
|
exports.flags.STANDARD_LOCKTIME_FLAGS = 0
|
||||||
exports.flags.VERIFY_SEQUENCE
|
| exports.flags.VERIFY_SEQUENCE
|
||||||
| exports.flags.MEDIAN_TIME_PAST;
|
| exports.flags.MEDIAN_TIME_PAST;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user