Skip to content

Commit

Permalink
Add the last block timestamp to the getBlockchainStatus
Browse files Browse the repository at this point in the history
  • Loading branch information
jjos2372 committed Jun 28, 2021
1 parent ebc6185 commit bd7742f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/brs/http/GetBlockchainStatus.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ JsonElement processRequest(HttpServletRequest req) {
response.addProperty(TIME_RESPONSE, timeService.getEpochTime());
Block lastBlock = blockchain.getLastBlock();
response.addProperty("lastBlock", lastBlock.getStringId());
response.addProperty("lastBlockTimestamp", lastBlock.getTimestamp());
response.addProperty("cumulativeDifficulty", lastBlock.getCumulativeDifficulty().toString());
response.addProperty(ResultFields.AVERAGE_COMMITMENT_NQT_RESPONSE, lastBlock.getAverageCommitment());
response.addProperty("numberOfBlocks", lastBlock.getHeight() + 1);
Expand Down

0 comments on commit bd7742f

Please sign in to comment.