Skip to content
This repository has been archived by the owner on Jun 7, 2023. It is now read-only.

Commit

Permalink
Compatibility with IRI v1.4.1.7
Browse files Browse the repository at this point in the history
  • Loading branch information
th0br0 committed Jan 28, 2018
1 parent 2d3c0ec commit acde397
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion index.js
@@ -1,12 +1,17 @@
var iri = com.iota.iri;
var snapshot = IOTA.milestone.latestSnapshot;

var Snapshot = Java.type("com.iota.iri.Snapshot");
var stateField = Snapshot.class.getDeclaredField("state");
stateField.setAccessible(true);

var Callable = iri.service.CallableRequest;
var Response = iri.service.dto.IXIResponse;

function getSnapshot(request) {
return Response.create({
index: snapshot.index(),
state: snapshot.getState()
state: stateField.get(snapshot)
});
}

Expand Down

0 comments on commit acde397

Please sign in to comment.