File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -246,9 +246,8 @@ const std::vector<std::string> &getAllNetMessageTypes();
246
246
enum ServiceFlags : uint64_t {
247
247
// Nothing
248
248
NODE_NONE = 0 ,
249
- // NODE_NETWORK means that the node is capable of serving the block chain. It is currently
250
- // set by all Bitcoin Core nodes, and is unset by SPV clients or other peers that just want
251
- // network services but don't provide them.
249
+ // NODE_NETWORK means that the node is capable of serving the complete block chain. It is currently
250
+ // set by all Bitcoin Core non pruned nodes, and is unset by SPV clients or other light clients.
252
251
NODE_NETWORK = (1 << 0 ),
253
252
// NODE_GETUTXO means the node is capable of responding to the getutxo protocol request.
254
253
// Bitcoin Core does not support this but a patch set called Bitcoin XT does.
@@ -264,6 +263,10 @@ enum ServiceFlags : uint64_t {
264
263
// NODE_XTHIN means the node supports Xtreme Thinblocks
265
264
// If this is turned off then the node will not service nor make xthin requests
266
265
NODE_XTHIN = (1 << 4 ),
266
+ // NODE_NETWORK_LIMITED means the same as NODE_NETWORK with the limitation of only
267
+ // serving the last 288 (2 day) blocks
268
+ // See BIP159 for details on how this is implemented.
269
+ NODE_NETWORK_LIMITED = (1 << 10 ),
267
270
268
271
// Bits 24-31 are reserved for temporary experiments. Just pick a bit that
269
272
// isn't getting used, or one not being used much, and notify the
Original file line number Diff line number Diff line change @@ -203,6 +203,8 @@ extern bool fPruneMode;
203
203
extern uint64_t nPruneTarget;
204
204
/* * Block files containing a block-height within MIN_BLOCKS_TO_KEEP of chainActive.Tip() will not be pruned. */
205
205
static const unsigned int MIN_BLOCKS_TO_KEEP = 288 ;
206
+ /* * Minimum blocks required to signal NODE_NETWORK_LIMITED */
207
+ static const unsigned int NODE_NETWORK_LIMITED_MIN_BLOCKS = 288 ;
206
208
207
209
static const signed int DEFAULT_CHECKBLOCKS = 6 ;
208
210
static const unsigned int DEFAULT_CHECKLEVEL = 3 ;
You can’t perform that action at this time.
0 commit comments