From 4bb441af817e7cb5d5ce8ec9d47a2d2b30fd73e3 Mon Sep 17 00:00:00 2001 From: qwdsds <50311944+qwdsds@users.noreply.github.com> Date: Tue, 20 Aug 2024 15:30:39 +0800 Subject: [PATCH] fix: error check --- storage/pipeline/pledge.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/storage/pipeline/pledge.go b/storage/pipeline/pledge.go index 7cdda9fa4cd..890b4e7248e 100644 --- a/storage/pipeline/pledge.go +++ b/storage/pipeline/pledge.go @@ -104,7 +104,7 @@ func (m *Sealing) sectorWeight(ctx context.Context, sector SectorInfo, expiratio alloc, err := piece.GetAllocation(ctx, m.Api, ts.Key()) if err != nil || alloc == nil { - if err == nil { + if err != nil { log.Errorw("failed to get allocation", "error", err) } w = big.Add(w, big.Mul(sectorDuration, abi.NewStoragePower(int64(piece.Piece().Size))))