handle electrs batching detection better

This commit is contained in:
Craig Raw 2021-09-27 08:15:20 +02:00
parent 395e90e2a5
commit 31f9cca33a

View file

@ -891,6 +891,10 @@ public class ElectrumServer {
if(server.startsWith("electrs/")) { if(server.startsWith("electrs/")) {
String electrsVersion = server.substring("electrs/".length()); String electrsVersion = server.substring("electrs/".length());
int dashIndex = electrsVersion.indexOf('-');
if(dashIndex > -1) {
electrsVersion = electrsVersion.substring(0, dashIndex);
}
try { try {
Version version = new Version(electrsVersion); Version version = new Version(electrsVersion);
if(version.compareTo(ELECTRS_MIN_BATCHING_VERSION) >= 0) { if(version.compareTo(ELECTRS_MIN_BATCHING_VERSION) >= 0) {