Skip to content

Commit

Permalink
break loop when found warm up sector
Browse files Browse the repository at this point in the history
  • Loading branch information
刘林欣 authored and codefather-filestar committed Jun 28, 2021
1 parent d78c5ec commit a7174ee
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions miner/warmup.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ func (m *Miner) winPoStWarmup(ctx context.Context) error {

var sector abi.SectorNumber = math.MaxUint64

out:
for dlIdx := range deadlines {
partitions, err := m.api.StateMinerPartitions(ctx, m.address, uint64(dlIdx), types.EmptyTSK)
if err != nil {
Expand All @@ -40,6 +41,7 @@ func (m *Miner) winPoStWarmup(ctx context.Context) error {
}

sector = abi.SectorNumber(b)
break out
}
}

Expand Down

0 comments on commit a7174ee

Please sign in to comment.