mirror of
https://github.com/bitcoinj/bitcoinj.git
synced 2025-03-10 00:09:31 +01:00
Services: add NODE_P2P_V2 service bit
This commit is contained in:
parent
a0724fcbb2
commit
e3ca33469f
1 changed files with 6 additions and 0 deletions
|
@ -45,6 +45,8 @@ public class Services {
|
|||
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. */
|
||||
public static final int NODE_P2P_V2 = 1 << 11;
|
||||
/** A service bit used by Bitcoin-ABC to announce Bitcoin Cash nodes. */
|
||||
public static final int NODE_BITCOIN_CASH = 1 << 5;
|
||||
|
||||
|
@ -169,6 +171,10 @@ public class Services {
|
|||
strings.add("NETWORK_LIMITED");
|
||||
bits &= ~NODE_NETWORK_LIMITED;
|
||||
}
|
||||
if ((bits & NODE_P2P_V2) == NODE_P2P_V2) {
|
||||
strings.add("P2P_V2");
|
||||
bits &= ~NODE_P2P_V2;
|
||||
}
|
||||
if (bits != 0)
|
||||
strings.add("remaining: " + Long.toBinaryString(bits));
|
||||
return InternalUtils.joiner(", ").join(strings);
|
||||
|
|
Loading…
Add table
Reference in a new issue