From 8762ba0a2e4a48ff3cbd3b32f4565d98ef832948 Mon Sep 17 00:00:00 2001 From: leej1012 Date: Wed, 19 Jun 2024 18:58:44 +0800 Subject: [PATCH] Update calculationUserIncentives --- .../github/ontio/service/impl/NodesServiceImpl.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) 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 1e56b31d..701a877b 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 @@ -691,10 +691,12 @@ public InspireResultDto calculationUserIncentives(UserInspireCalculationDto dto) || (newCurrentStake.equals(theLastConsensusNodeStake) && publicKey.compareTo(theLastConsensusNodePublicKey) == 1)) { one.setStatus(2); - for (NodeInfoOnChain consensus : nodeInfoOnChains) { - if (consensus.getPublicKey().equals(theLastConsensusNodePublicKey)) { - consensus.setStatus(1); - break; + if (!publicKey.equals(theLastConsensusNodePublicKey)) { + for (NodeInfoOnChain consensus : nodeInfoOnChains) { + if (consensus.getPublicKey().equals(theLastConsensusNodePublicKey)) { + consensus.setStatus(1); + break; + } } } }