Skip to content

Commit

Permalink
Set litecoinj version to 0.1, and remove unnecessary Bitcoin Cash nod…
Browse files Browse the repository at this point in the history
…e service checking
  • Loading branch information
pokkst committed Apr 10, 2021
1 parent 047c5e1 commit f9c74af
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 10 deletions.
2 changes: 1 addition & 1 deletion core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ plugins {
id 'eclipse'
}

version = '0.16-SNAPSHOT'
version = '0.1'

dependencies {
api 'org.bouncycastle:bcprov-jdk15to18:1.68'
Expand Down
6 changes: 0 additions & 6 deletions core/src/main/java/org/bitcoinj/core/Peer.java
Original file line number Diff line number Diff line change
Expand Up @@ -534,12 +534,6 @@ private void processVersionMessage(VersionMessage peerVersionMessage) throws Pro
close();
return;
}
if ((peerVersionMessage.localServices & VersionMessage.NODE_BITCOIN_CASH) == VersionMessage.NODE_BITCOIN_CASH) {
log.info("{}: Peer follows an incompatible block chain.", this);
// Shut down the channel gracefully.
close();
return;
}
if (peerVersionMessage.bestHeight < 0)
// In this case, it's a protocol violation.
throw new ProtocolException("Peer reports invalid best height: " + peerVersionMessage.bestHeight);
Expand Down
4 changes: 1 addition & 3 deletions core/src/main/java/org/bitcoinj/core/VersionMessage.java
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
public class VersionMessage extends Message {

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

Expand All @@ -58,8 +58,6 @@ public class VersionMessage extends Message {
public static final int NODE_WITNESS = 1 << 3;
/** 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;
/** A service bit used by Bitcoin-ABC to announce Bitcoin Cash nodes. */
public static final int NODE_BITCOIN_CASH = 1 << 5;

/**
* The version number of the protocol spoken.
Expand Down

0 comments on commit f9c74af

Please sign in to comment.