mirror of
https://github.com/bitcoinj/bitcoinj.git
synced 2025-03-10 09:20:04 +01:00
Services: add NODE_COMPACT_FILTERS service bit
This commit is contained in:
parent
2c9cdb77cc
commit
a0724fcbb2
1 changed files with 6 additions and 0 deletions
|
@ -41,6 +41,8 @@ public class Services {
|
||||||
public static final int NODE_BLOOM = 1 << 2;
|
public static final int NODE_BLOOM = 1 << 2;
|
||||||
/** Indicates that a node can be asked for blocks and transactions including witness data. */
|
/** Indicates that a node can be asked for blocks and transactions including witness data. */
|
||||||
public static final int NODE_WITNESS = 1 << 3;
|
public static final int NODE_WITNESS = 1 << 3;
|
||||||
|
/** Indicates the node will service basic block filter requests (BIP157, BIP158). */
|
||||||
|
public static final int NODE_COMPACT_FILTERS = 1 << 6;
|
||||||
/** A service bit that denotes whether the peer has at least the last two days worth of blockchain (BIP159). */
|
/** A service bit that denotes whether the peer has at least the last two days worth of blockchain (BIP159). */
|
||||||
public static final int NODE_NETWORK_LIMITED = 1 << 10;
|
public static final int NODE_NETWORK_LIMITED = 1 << 10;
|
||||||
/** A service bit used by Bitcoin-ABC to announce Bitcoin Cash nodes. */
|
/** A service bit used by Bitcoin-ABC to announce Bitcoin Cash nodes. */
|
||||||
|
@ -159,6 +161,10 @@ public class Services {
|
||||||
strings.add("WITNESS");
|
strings.add("WITNESS");
|
||||||
bits &= ~NODE_WITNESS;
|
bits &= ~NODE_WITNESS;
|
||||||
}
|
}
|
||||||
|
if ((bits & NODE_COMPACT_FILTERS) == NODE_COMPACT_FILTERS) {
|
||||||
|
strings.add("COMPACT_FILTERS");
|
||||||
|
bits &= ~NODE_COMPACT_FILTERS;
|
||||||
|
}
|
||||||
if ((bits & NODE_NETWORK_LIMITED) == NODE_NETWORK_LIMITED) {
|
if ((bits & NODE_NETWORK_LIMITED) == NODE_NETWORK_LIMITED) {
|
||||||
strings.add("NETWORK_LIMITED");
|
strings.add("NETWORK_LIMITED");
|
||||||
bits &= ~NODE_NETWORK_LIMITED;
|
bits &= ~NODE_NETWORK_LIMITED;
|
||||||
|
|
Loading…
Add table
Reference in a new issue