scan only for 0.15 nodes (#633)

This commit is contained in:
m2049r 2019-11-10 12:11:01 +01:00 committed by GitHub
parent 2258cb7096
commit 551c3b9fb6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 0 deletions

View File

@ -266,6 +266,7 @@ public class NodeFragment extends Fragment
seedList.add(new NodeInfo(new InetSocketAddress("198.74.231.92", 18080)));
seedList.add(new NodeInfo(new InetSocketAddress("195.154.123.123", 18080)));
seedList.add(new NodeInfo(new InetSocketAddress("212.83.172.165", 18080)));
seedList.add(new NodeInfo(new InetSocketAddress("192.110.160.146", 18080)));
d.seedPeers(seedList);
d.awaitTermination(NODES_TO_FIND);
}

View File

@ -235,6 +235,8 @@ public class NodeInfo extends Node {
String rpcVersion = json.getString("jsonrpc");
if (!RPC_VERSION.equals(rpcVersion))
return false;
if (!json.has("credits")) // introduced in monero v0.15.0
return false;
final JSONObject header = json.getJSONObject(
"result").getJSONObject("block_header");
height = header.getLong("height");