Skip to content

Commit

Permalink
Add nodestatus command
Browse files Browse the repository at this point in the history
  • Loading branch information
fireduck64 committed Oct 24, 2018
1 parent e1c25eb commit 9e81c5a
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions client/src/SnowBlossomClient.java
Expand Up @@ -237,6 +237,13 @@ else if (command.equals("loadtest"))
{
client.runLoadTest();
}
else if (command.equals("nodestatus"))
{
NodeStatus ns = client.getNodeStatus();
JsonFormat.Printer printer = JsonFormat.printer();
System.out.println(printer.print(ns));

}
else
{
logger.log(Level.SEVERE, String.format("Unknown command %s.", command));
Expand Down Expand Up @@ -612,11 +619,10 @@ public List<TransactionBridge> getAllSpendable()
return all;
}

/*public ChainHash getCurrentUtxoRootHash()
public NodeStatus getNodeStatus()
{
return new ChainHash(blockingStub.getNodeStatus( NullRequest.newBuilder().build() ).getHeadSummary().getHeader().getUtxoRootHash());
}*/
return blockingStub.getNodeStatus( NullRequest.newBuilder().build() );
}

public List<TransactionBridge> getSpendable(AddressSpecHash addr)
throws ValidationException
Expand Down

0 comments on commit 9e81c5a

Please sign in to comment.