mirror of
https://github.com/dashpay/dash.git
synced 2024-12-25 20:12:57 +01:00
Add NODE_NETWORK_LIMITED flags and min block amount constants
This commit is contained in:
parent
91eeaa0335
commit
7caba38568
@ -246,9 +246,8 @@ const std::vector<std::string> &getAllNetMessageTypes();
|
|||||||
enum ServiceFlags : uint64_t {
|
enum ServiceFlags : uint64_t {
|
||||||
// Nothing
|
// Nothing
|
||||||
NODE_NONE = 0,
|
NODE_NONE = 0,
|
||||||
// NODE_NETWORK means that the node is capable of serving the block chain. It is currently
|
// NODE_NETWORK means that the node is capable of serving the complete block chain. It is currently
|
||||||
// set by all Bitcoin Core nodes, and is unset by SPV clients or other peers that just want
|
// set by all Bitcoin Core non pruned nodes, and is unset by SPV clients or other light clients.
|
||||||
// network services but don't provide them.
|
|
||||||
NODE_NETWORK = (1 << 0),
|
NODE_NETWORK = (1 << 0),
|
||||||
// NODE_GETUTXO means the node is capable of responding to the getutxo protocol request.
|
// NODE_GETUTXO means the node is capable of responding to the getutxo protocol request.
|
||||||
// Bitcoin Core does not support this but a patch set called Bitcoin XT does.
|
// Bitcoin Core does not support this but a patch set called Bitcoin XT does.
|
||||||
@ -264,6 +263,10 @@ enum ServiceFlags : uint64_t {
|
|||||||
// NODE_XTHIN means the node supports Xtreme Thinblocks
|
// NODE_XTHIN means the node supports Xtreme Thinblocks
|
||||||
// If this is turned off then the node will not service nor make xthin requests
|
// If this is turned off then the node will not service nor make xthin requests
|
||||||
NODE_XTHIN = (1 << 4),
|
NODE_XTHIN = (1 << 4),
|
||||||
|
// NODE_NETWORK_LIMITED means the same as NODE_NETWORK with the limitation of only
|
||||||
|
// serving the last 288 (2 day) blocks
|
||||||
|
// See BIP159 for details on how this is implemented.
|
||||||
|
NODE_NETWORK_LIMITED = (1 << 10),
|
||||||
|
|
||||||
// Bits 24-31 are reserved for temporary experiments. Just pick a bit that
|
// Bits 24-31 are reserved for temporary experiments. Just pick a bit that
|
||||||
// isn't getting used, or one not being used much, and notify the
|
// isn't getting used, or one not being used much, and notify the
|
||||||
|
@ -203,6 +203,8 @@ extern bool fPruneMode;
|
|||||||
extern uint64_t nPruneTarget;
|
extern uint64_t nPruneTarget;
|
||||||
/** Block files containing a block-height within MIN_BLOCKS_TO_KEEP of chainActive.Tip() will not be pruned. */
|
/** Block files containing a block-height within MIN_BLOCKS_TO_KEEP of chainActive.Tip() will not be pruned. */
|
||||||
static const unsigned int MIN_BLOCKS_TO_KEEP = 288;
|
static const unsigned int MIN_BLOCKS_TO_KEEP = 288;
|
||||||
|
/** Minimum blocks required to signal NODE_NETWORK_LIMITED */
|
||||||
|
static const unsigned int NODE_NETWORK_LIMITED_MIN_BLOCKS = 288;
|
||||||
|
|
||||||
static const signed int DEFAULT_CHECKBLOCKS = 6;
|
static const signed int DEFAULT_CHECKBLOCKS = 6;
|
||||||
static const unsigned int DEFAULT_CHECKLEVEL = 3;
|
static const unsigned int DEFAULT_CHECKLEVEL = 3;
|
||||||
|
Loading…
Reference in New Issue
Block a user