From eab91aa130a01c0b4e983c6b2ca42eb6232dc408 Mon Sep 17 00:00:00 2001 From: leej1012 Date: Wed, 5 Jun 2024 17:48:03 +0800 Subject: [PATCH] Update getNodeOnChainConfig --- .../java/com/github/ontio/model/dto/NodeManagementDto.java | 2 ++ .../java/com/github/ontio/service/impl/NodesServiceImpl.java | 3 +++ 2 files changed, 5 insertions(+) diff --git a/back-end-projects/Explorer/src/main/java/com/github/ontio/model/dto/NodeManagementDto.java b/back-end-projects/Explorer/src/main/java/com/github/ontio/model/dto/NodeManagementDto.java index 74637220..fb110ebc 100644 --- a/back-end-projects/Explorer/src/main/java/com/github/ontio/model/dto/NodeManagementDto.java +++ b/back-end-projects/Explorer/src/main/java/com/github/ontio/model/dto/NodeManagementDto.java @@ -41,4 +41,6 @@ public class NodeManagementDto { private String withdrawableAmount; private String lockedAmount; + + private int currentRound; } diff --git a/back-end-projects/Explorer/src/main/java/com/github/ontio/service/impl/NodesServiceImpl.java b/back-end-projects/Explorer/src/main/java/com/github/ontio/service/impl/NodesServiceImpl.java index a0b19c7e..140f6d27 100644 --- a/back-end-projects/Explorer/src/main/java/com/github/ontio/service/impl/NodesServiceImpl.java +++ b/back-end-projects/Explorer/src/main/java/com/github/ontio/service/impl/NodesServiceImpl.java @@ -1117,6 +1117,9 @@ public ResponseBean getNodeOnChainConfig(String address, String publicKey) { } try { initSDK(); + int currentRound = sdk.getGovernanceView(); + nodeManagementDto.setCurrentRound(currentRound); + String peerPoolInfoStr = sdk.getPeerPoolInfo(publicKey); if (StringUtils.hasLength(peerPoolInfoStr)) { JSONObject peerPoolInfo = JSONObject.parseObject(peerPoolInfoStr);