Skip to content
This repository was archived by the owner on Aug 19, 2024. It is now read-only.
Merged
Prev Previous commit
Next Next commit
fix comments
  • Loading branch information
mckim19 committed Nov 7, 2022
commit 8025b6cfa79c2deb1f56435f4e821baa70b4f1a8
3 changes: 1 addition & 2 deletions consensus/istanbul/validator/weighted.go
Original file line number Diff line number Diff line change
Expand Up @@ -832,8 +832,7 @@ func calcWeight(weightedValidators []*weightedValidator, stakingAmounts []float6
for i, weightedVal := range weightedValidators {
weight := uint64(math.Round(stakingAmounts[i] * 100 / totalStaking))
if weight <= 0 {
// A validator, who holds zero or small stake, has minimum weight, 1
// And all validators have the same weight after the Kore hard fork
// A validator, who holds zero or small stake, has minimum weight, 1.
weight = 1
}
atomic.StoreUint64(&weightedVal.weight, weight)
Expand Down