sealing pipeline: Only set pc commd when deals are present

This commit is contained in:
Łukasz Magiera 2023-08-08 15:35:19 +02:00
parent 556815f844
commit 3887bf97a4
2 changed files with 4 additions and 2 deletions

View File

@ -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"

View File

@ -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())