ledger, stake: only reward those that have at least 0 stake
@@ -518,6 +518,7 @@ func (l *Ledger) rewardValidators(ss accounts, tx *Transaction) error {
if popped.Sender != tx.Sender {
stake, _ := ss.ReadAccountStake(popped.Sender)
+ if stake > 0 {
candidates = append(candidates, popped)
stakes = append(stakes, stake)
@@ -529,6 +530,7 @@ func (l *Ledger) rewardValidators(ss accounts, tx *Transaction) error {
return errors.Wrap(err, "stake: failed to hash transaction ID for entropy src")
}
}
+ }
for _, parentID := range popped.ParentIDs {
if _, seen := visited[parentID]; !seen {
