Skip to content

Commit da14538

Browse files
committed
fix the param set
1 parent 8602d26 commit da14538

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

‎src/main/java/org/tron/core/services/DelegationService.java‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ public void payStandbyWitness() {
3333
witnessAddressList.add(witnessCapsule.getAddress());
3434
}
3535
sortWitness(witnessAddressList);
36-
if (witnessAddressList.size() > ChainConstant.MAX_ACTIVE_WITNESS_NUM) {
37-
witnessAddressList = witnessAddressList.subList(0, ChainConstant.MAX_ACTIVE_WITNESS_NUM);
36+
if (witnessAddressList.size() > ChainConstant.WITNESS_STANDBY_LENGTH) {
37+
witnessAddressList = witnessAddressList.subList(0, ChainConstant.WITNESS_STANDBY_LENGTH);
3838
}
3939

4040
long voteSum = 0;
@@ -176,8 +176,9 @@ private long computeReward(long cycle, AccountCapsule accountCapsule) {
176176
long userVote = vote.getVoteCount();
177177
double voteRate = (double) userVote / totalVote;
178178
reward += voteRate * totalReward;
179-
logger.debug("computeReward {} {},{},{},{}", Hex.toHexString(srAddress), userVote, totalVote,
180-
totalReward, reward);
179+
logger.debug("computeReward {} {} {} {},{},{},{}", cycle,
180+
Hex.toHexString(accountCapsule.getAddress().toByteArray()), Hex.toHexString(srAddress),
181+
userVote, totalVote, totalReward, reward);
181182
}
182183
return reward;
183184
}

0 commit comments

Comments
 (0)