Make it cleaner
License: MIT Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
This commit is contained in:
parent
f16756cc54
commit
1914412adf
@ -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)
|
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
|
var winners []sectorbuilder.EPostCandidate
|
||||||
for _, c := range candidates {
|
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)
|
winners = append(winners, c)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user