From b63687795d8e0ae7565f6563f6b0c3eaeccaa887 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E6=9E=97=E6=AC=A3?= Date: Mon, 16 Nov 2020 17:51:02 +0800 Subject: [PATCH] break loop when found warm up sector --- miner/warmup.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/miner/warmup.go b/miner/warmup.go index d0b8c5b35..5340675b2 100644 --- a/miner/warmup.go +++ b/miner/warmup.go @@ -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 { @@ -40,6 +41,7 @@ func (m *Miner) winPoStWarmup(ctx context.Context) error { } sector = abi.SectorNumber(b) + break out } }