mirror of
https://github.com/sparrowwallet/sparrow.git
synced 2024-12-25 05:06:45 +00:00
handle electrs batching detection better
This commit is contained in:
parent
395e90e2a5
commit
31f9cca33a
1 changed files with 4 additions and 0 deletions
|
@ -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) {
|
||||||
|
|
Loading…
Reference in a new issue