ledger: fixed stake weighing calculation
@@ -255,7 +255,7 @@ func (l *Ledger) ReceiveQuery(tx *Transaction, responses map[[blake2b.Size256]by
var votes []float64
for _, stake := range stakes {
- votes = append(votes, float64(stake)/float64(maxStake))
+ votes = append(votes, float64(stake)/float64(maxStake)/float64(len(responses)))
}
log.Debug().Floats64("weighed_votes", votes).Msg("Weighed votes with stakes, and updated the consensus mechanism.")
