Skip to content

Commit f9c74af

Browse files
committed
Set litecoinj version to 0.1, and remove unnecessary Bitcoin Cash node service checking
1 parent 047c5e1 commit f9c74af

File tree

3 files changed

+2
-10
lines changed

3 files changed

+2
-10
lines changed

core/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ plugins {
55
id 'eclipse'
66
}
77

8-
version = '0.16-SNAPSHOT'
8+
version = '0.1'
99

1010
dependencies {
1111
api 'org.bouncycastle:bcprov-jdk15to18:1.68'

core/src/main/java/org/bitcoinj/core/Peer.java

-6
Original file line numberDiff line numberDiff line change
@@ -534,12 +534,6 @@ private void processVersionMessage(VersionMessage peerVersionMessage) throws Pro
534534
close();
535535
return;
536536
}
537-
if ((peerVersionMessage.localServices & VersionMessage.NODE_BITCOIN_CASH) == VersionMessage.NODE_BITCOIN_CASH) {
538-
log.info("{}: Peer follows an incompatible block chain.", this);
539-
// Shut down the channel gracefully.
540-
close();
541-
return;
542-
}
543537
if (peerVersionMessage.bestHeight < 0)
544538
// In this case, it's a protocol violation.
545539
throw new ProtocolException("Peer reports invalid best height: " + peerVersionMessage.bestHeight);

core/src/main/java/org/bitcoinj/core/VersionMessage.java

+1-3
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
public class VersionMessage extends Message {
4545

4646
/** The version of this library release, as a string. */
47-
public static final String BITCOINJ_VERSION = "0.16-SNAPSHOT";
47+
public static final String BITCOINJ_VERSION = "0.1";
4848
/** The value that is prepended to the subVer field of this application. */
4949
public static final String LIBRARY_SUBVER = "/litecoinj:" + BITCOINJ_VERSION + "/";
5050

@@ -58,8 +58,6 @@ public class VersionMessage extends Message {
5858
public static final int NODE_WITNESS = 1 << 3;
5959
/** A service bit that denotes whether the peer has at least the last two days worth of blockchain (BIP159). */
6060
public static final int NODE_NETWORK_LIMITED = 1 << 10;
61-
/** A service bit used by Bitcoin-ABC to announce Bitcoin Cash nodes. */
62-
public static final int NODE_BITCOIN_CASH = 1 << 5;
6361

6462
/**
6563
* The version number of the protocol spoken.

0 commit comments

Comments
 (0)