diff --git a/app/venus-sealer/init.go b/app/venus-sealer/init.go index e0ee17dd..8ce7de23 100644 --- a/app/venus-sealer/init.go +++ b/app/venus-sealer/init.go @@ -137,9 +137,8 @@ var initCmd = &cli.Command{ Usage: "indicate the deployment method of the venus-market, one of `solo`, `pool`, Default: `solo`", }, &cli.StringFlag{ - Name: "market-url", - Usage: "market url", - Required: true, + Name: "market-url", + Usage: "market url", }, &cli.StringFlag{ Name: "market-token", diff --git a/go.mod b/go.mod index 949963bc..6c4bc106 100644 --- a/go.mod +++ b/go.mod @@ -33,7 +33,7 @@ require ( github.com/filecoin-project/specs-actors/v6 v6.0.1 github.com/filecoin-project/specs-storage v0.1.1-0.20201105051918-5188d9774506 github.com/filecoin-project/venus v1.1.3-rc1 - github.com/filecoin-project/venus-market v1.0.2-0.20211206084715-070874dc17eb + github.com/filecoin-project/venus-market v1.0.2-0.20211217074314-b0f03a224ab5 github.com/filecoin-project/venus-messager v1.2.2-rc1.0.20211201075617-c9dd295b905c github.com/gbrlsnchs/jwt/v3 v3.0.0 github.com/golang/mock v1.6.0 diff --git a/storage-sealing/deals.go b/storage-sealing/deals.go index 190b47ce..0a786c98 100644 --- a/storage-sealing/deals.go +++ b/storage-sealing/deals.go @@ -2,6 +2,7 @@ package sealing import ( "context" + "github.com/filecoin-project/go-padreader" types2 "github.com/filecoin-project/venus-market/types" "github.com/filecoin-project/venus-sealer/types" @@ -19,13 +20,18 @@ func (m *Sealing) DealSector(ctx context.Context) ([]types.DealAssign, error) { var assigned []types.DealAssign for _, deal := range deals { - r, err := m.pieceStorage.Read(ctx, deal.PieceStorage) + r, err := m.pieceStorage.Read(ctx, deal.PieceCID.String()) if err != nil { log.Errorf("read piece from piece storage %v", err) continue } - so, err := m.SectorAddPieceToAny(ctx, deal.Length.Unpadded(), r, types.PieceDealInfo{ + padR, err := padreader.NewInflator(r, uint64(deal.PayloadSize), deal.PieceSize.Unpadded()) + if err != nil { + return nil, err + } + + so, err := m.SectorAddPieceToAny(ctx, deal.Length.Unpadded(), padR, types.PieceDealInfo{ PublishCid: &deal.PublishCid, DealID: deal.DealID, DealProposal: &deal.DealProposal,