diff --git a/storagemarket/impl/client.go b/storagemarket/impl/client.go index c4577c6b..121f4fab 100644 --- a/storagemarket/impl/client.go +++ b/storagemarket/impl/client.go @@ -83,7 +83,7 @@ func NewClient(h host.Host, bs blockstore.Blockstore, dataTransfer datatransfer. if err != nil { return nil, err } - pio := pieceio.NewPieceIO(pr, carIO, sectorCalculator, fs) + pio := pieceio.NewPieceIO(pr, carIO, sectorCalculator, fs, bs) c := &Client{ h: h, diff --git a/storagemarket/impl/client_utils.go b/storagemarket/impl/client_utils.go index 9effef64..54a848f6 100644 --- a/storagemarket/impl/client_utils.go +++ b/storagemarket/impl/client_utils.go @@ -41,7 +41,7 @@ func (c *Client) commP(ctx context.Context, root cid.Cid) ([]byte, uint64, error allSelector := ssb.ExploreRecursive(selector.RecursionLimitNone(), ssb.ExploreAll(ssb.ExploreRecursiveEdge())).Node() - commp, tmpFile, err := c.pio.GeneratePieceCommitment(c.bs, root, allSelector) + commp, tmpFile, err := c.pio.GeneratePieceCommitment(root, allSelector) if err != nil { return nil, 0, xerrors.Errorf("generating CommP: %w", err) } diff --git a/storagemarket/impl/provider_states.go b/storagemarket/impl/provider_states.go index 5045b96d..31735904 100644 --- a/storagemarket/impl/provider_states.go +++ b/storagemarket/impl/provider_states.go @@ -140,7 +140,7 @@ func (p *Provider) staged(ctx context.Context, deal MinerDeal) (func(*MinerDeal) allSelector := ssb.ExploreRecursive(selector.RecursionLimitNone(), ssb.ExploreAll(ssb.ExploreRecursiveEdge())).Node() - commp, path, err := p.pio.GeneratePieceCommitment(deal.Ref, allSelector) + commp, file, err := p.pio.GeneratePieceCommitment(deal.Ref, allSelector) if err != nil { return nil, err } @@ -169,7 +169,7 @@ func (p *Provider) staged(ctx context.Context, deal MinerDeal) (func(*MinerDeal) return func(deal *MinerDeal) { deal.SectorID = sectorID - deal.PiecePath = path + deal.PiecePath = file.Path() }, nil }