Skip to content

Commit

Permalink
Services: add NODE_COMPACT_FILTERS service bit
Browse files Browse the repository at this point in the history
  • Loading branch information
schildbach committed Dec 14, 2024
1 parent 139664f commit 0cce51c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions core/src/main/java/org/bitcoinj/core/VersionMessage.java
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ public class VersionMessage extends Message {
public static final int NODE_BLOOM = 1 << 2;
/** Indicates that a node can be asked for blocks and transactions including witness data. */
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). */
public static final int NODE_NETWORK_LIMITED = 1 << 10;
/** Indicates the node supports BIP324 transport. */
Expand Down Expand Up @@ -331,6 +333,10 @@ public static String toStringServices(long services) {
strings.add("WITNESS");
services &= ~NODE_WITNESS;
}
if ((services & NODE_COMPACT_FILTERS) == NODE_COMPACT_FILTERS) {
strings.add("COMPACT_FILTERS");
services &= ~NODE_COMPACT_FILTERS;
}
if ((services & NODE_NETWORK_LIMITED) == NODE_NETWORK_LIMITED) {
strings.add("NETWORK_LIMITED");
services &= ~NODE_NETWORK_LIMITED;
Expand Down

0 comments on commit 0cce51c

Please sign in to comment.