From d32b014c305465538a968187b22fb25bc31b3c7e Mon Sep 17 00:00:00 2001 From: leej1012 Date: Fri, 9 Aug 2024 16:48:29 +0800 Subject: [PATCH] Update Node --- .../com/github/ontio/model/dto/NodeStakeDto.java | 8 ++++++++ .../ontio/service/impl/AddressServiceImpl.java | 16 ++++++++++++++++ .../resources/mapper/NodeInfoOffChainMapper.xml | 4 ++++ 3 files changed, 28 insertions(+) diff --git a/back-end-projects/Explorer/src/main/java/com/github/ontio/model/dto/NodeStakeDto.java b/back-end-projects/Explorer/src/main/java/com/github/ontio/model/dto/NodeStakeDto.java index 7ba846d1..eb11ff2f 100644 --- a/back-end-projects/Explorer/src/main/java/com/github/ontio/model/dto/NodeStakeDto.java +++ b/back-end-projects/Explorer/src/main/java/com/github/ontio/model/dto/NodeStakeDto.java @@ -41,4 +41,12 @@ public class NodeStakeDto { // user apr private String apr; + + private Integer feeSharingRatio; + + private Integer ontologyHarbinger; + + private Integer risky; + + private Integer badActor; } diff --git a/back-end-projects/Explorer/src/main/java/com/github/ontio/service/impl/AddressServiceImpl.java b/back-end-projects/Explorer/src/main/java/com/github/ontio/service/impl/AddressServiceImpl.java index 0a0061cc..0bf4aa6c 100644 --- a/back-end-projects/Explorer/src/main/java/com/github/ontio/service/impl/AddressServiceImpl.java +++ b/back-end-projects/Explorer/src/main/java/com/github/ontio/service/impl/AddressServiceImpl.java @@ -1642,6 +1642,10 @@ private void putStakingInfoList4Onto(String address, String stakingInfo, NodeInf String publicKey = nodeInfoOffChain.getPublicKey(); String nodeName = nodeInfoOffChain.getName(); String stakeWalletAddress = nodeInfoOffChain.getAddress(); + Integer badActor = nodeInfoOffChain.getBadActor(); + Integer risky = nodeInfoOffChain.getRisky(); + Integer feeSharingRatio = nodeInfoOffChain.getFeeSharingRatio(); + Integer ontologyHarbinger = nodeInfoOffChain.getOntologyHarbinger(); if (address.equalsIgnoreCase(stakeWalletAddress)) { return; } @@ -1680,6 +1684,10 @@ private void putStakingInfoList4Onto(String address, String stakingInfo, NodeInf dto.setMaxAuthorize(maxAuthorize); dto.setCurrentRound(currentRound); dto.setApr(userApy); + dto.setFeeSharingRatio(feeSharingRatio); + dto.setOntologyHarbinger(ontologyHarbinger); + dto.setRisky(risky); + dto.setBadActor(badActor); nodeStakeDtos.add(dto); } if (withdrawUnfreezePos > 0) { @@ -1696,6 +1704,10 @@ private void putStakingInfoList4Onto(String address, String stakingInfo, NodeInf dto.setMaxAuthorize(maxAuthorize); dto.setCurrentRound(currentRound); dto.setApr(userApy); + dto.setFeeSharingRatio(feeSharingRatio); + dto.setOntologyHarbinger(ontologyHarbinger); + dto.setRisky(risky); + dto.setBadActor(badActor); nodeStakeDtos.add(dto); } if (withdrawPos + withdrawFreezePos > 0) { @@ -1713,6 +1725,10 @@ private void putStakingInfoList4Onto(String address, String stakingInfo, NodeInf dto.setMaxAuthorize(maxAuthorize); dto.setCurrentRound(currentRound); dto.setApr(userApy); + dto.setFeeSharingRatio(feeSharingRatio); + dto.setOntologyHarbinger(ontologyHarbinger); + dto.setRisky(risky); + dto.setBadActor(badActor); nodeStakeDtos.add(dto); } } diff --git a/back-end-projects/Explorer/src/main/resources/mapper/NodeInfoOffChainMapper.xml b/back-end-projects/Explorer/src/main/resources/mapper/NodeInfoOffChainMapper.xml index daa7cb90..f7fed5fa 100644 --- a/back-end-projects/Explorer/src/main/resources/mapper/NodeInfoOffChainMapper.xml +++ b/back-end-projects/Explorer/src/main/resources/mapper/NodeInfoOffChainMapper.xml @@ -97,6 +97,10 @@ a.name, a.address, a.node_type, + a.bad_actor, + a.risky, + a.fee_sharing_ratio, + a.ontology_harbinger, b.progress, b.total_pos, b.max_authorize,