Make it cleaner

License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
This commit is contained in:
Jakub Sztandera 2019-12-09 22:03:25 +01:00
parent f16756cc54
commit 1914412adf
No known key found for this signature in database
GPG Key ID: 9A9AF56F8B3879BA

View File

@ -526,11 +526,9 @@ func IsRoundWinner(ctx context.Context, ts *types.TipSet, round int64, miner add
return nil, xerrors.Errorf("failed to look up miners sector size: %w", err)
}
snum := types.BigDiv(pow.MinerPower, types.NewInt(ssize))
var winners []sectorbuilder.EPostCandidate
for _, c := range candidates {
if types.IsTicketWinner(c.PartialTicket[:], ssize, snum.Uint64(), pow.TotalPower) {
if types.IsTicketWinner(c.PartialTicket[:], ssize, uint64(len(sinfos)), pow.TotalPower) {
winners = append(winners, c)
}
}