You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On feature/v1.2.0 after getStakeSnapshot batching changes in getting biggest staker, inside for loop we have:
for i := 0; i < len(stakeSnapshotArray); i++ {
log.Debug("Propose: Staker Id: ", i)
stake := stakeSnapshotArray[i]
log.Debugf("Stake Snapshot of staker having stakerId %d is %s", i+1, stake)
if stake.Cmp(biggestStake) > 0 {
biggestStake = stake
biggestStakerId = uint32(i + 1)
}
}
Here log.Debug("Propose: Staker Id: i") is incorrect as staker Id should be i+1 and
we do log it correctly after 2 lines in log.Debugf("Stake Snapshot of staker having stakerId %d is %s", i+1, stake)
So we can remove the redundant and incorrect log log.Debug("Propose: Staker Id: ", i)
The text was updated successfully, but these errors were encountered:
Yashk767
changed the title
staker Id needs to be corrected in logs in getting biggest staker Id
staker Id needs to be corrected in logs in getting biggest staker
Aug 9, 2024
Description
On
feature/v1.2.0
aftergetStakeSnapshot
batching changes in getting biggest staker, inside for loop we have:Here
log.Debug("Propose: Staker Id: i")
is incorrect as staker Id should bei+1
andwe do log it correctly after 2 lines in
log.Debugf("Stake Snapshot of staker having stakerId %d is %s", i+1, stake)
So we can remove the redundant and incorrect log
log.Debug("Propose: Staker Id: ", i)
The text was updated successfully, but these errors were encountered: