From 3887bf97a494a35489ebbbf374e4edb2d6be532c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Magiera?= Date: Tue, 8 Aug 2023 15:35:19 +0200 Subject: [PATCH] sealing pipeline: Only set pc commd when deals are present --- storage/pipeline/precommit_batch_test.go | 2 +- storage/pipeline/states_sealing.go | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/storage/pipeline/precommit_batch_test.go b/storage/pipeline/precommit_batch_test.go index 74dbd7ec7..478da7702 100644 --- a/storage/pipeline/precommit_batch_test.go +++ b/storage/pipeline/precommit_batch_test.go @@ -4,7 +4,6 @@ package sealing_test import ( "bytes" "context" - "github.com/filecoin-project/go-state-types/network" "sort" "sync" "testing" @@ -17,6 +16,7 @@ import ( "github.com/filecoin-project/go-state-types/abi" "github.com/filecoin-project/go-state-types/big" minertypes "github.com/filecoin-project/go-state-types/builtin/v9/miner" + "github.com/filecoin-project/go-state-types/network" miner6 "github.com/filecoin-project/specs-actors/v6/actors/builtin/miner" "github.com/filecoin-project/lotus/api" diff --git a/storage/pipeline/states_sealing.go b/storage/pipeline/states_sealing.go index d4e844a00..1d7b36fe8 100644 --- a/storage/pipeline/states_sealing.go +++ b/storage/pipeline/states_sealing.go @@ -366,8 +366,10 @@ func (m *Sealing) preCommitInfo(ctx statemachine.Context, sector SectorInfo) (*m SealedCID: *sector.CommR, SealRandEpoch: sector.TicketEpoch, DealIDs: sector.dealIDs(), + } - UnsealedCid: sector.CommD, + if sector.hasDeals() { + params.UnsealedCid = sector.CommD } collateral, err := m.Api.StateMinerPreCommitDepositForPower(ctx.Context(), m.maddr, *params, ts.Key())