mirror of https://github.com/m2049r/xmrwallet.git
scan only for 0.15 nodes (#634)
This commit is contained in:
parent
551c3b9fb6
commit
08e8a48138
|
@ -235,10 +235,10 @@ public class NodeInfo extends Node {
|
||||||
String rpcVersion = json.getString("jsonrpc");
|
String rpcVersion = json.getString("jsonrpc");
|
||||||
if (!RPC_VERSION.equals(rpcVersion))
|
if (!RPC_VERSION.equals(rpcVersion))
|
||||||
return false;
|
return false;
|
||||||
if (!json.has("credits")) // introduced in monero v0.15.0
|
final JSONObject result = json.getJSONObject("result");
|
||||||
|
if (!result.has("credits")) // introduced in monero v0.15.0
|
||||||
return false;
|
return false;
|
||||||
final JSONObject header = json.getJSONObject(
|
final JSONObject header = result.getJSONObject("block_header");
|
||||||
"result").getJSONObject("block_header");
|
|
||||||
height = header.getLong("height");
|
height = header.getLong("height");
|
||||||
timestamp = header.getLong("timestamp");
|
timestamp = header.getLong("timestamp");
|
||||||
majorVersion = header.getInt("major_version");
|
majorVersion = header.getInt("major_version");
|
||||||
|
|
Loading…
Reference in New Issue