Skip to content

Commit

Permalink
fix: error check
Browse files Browse the repository at this point in the history
  • Loading branch information
qwdsds authored Aug 20, 2024
1 parent dbef5de commit 4bb441a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion storage/pipeline/pledge.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))))
Expand Down

0 comments on commit 4bb441a

Please sign in to comment.