diff --git a/api/v0api/full.go b/api/v0api/full.go index 20e5a7179..b37e89155 100644 --- a/api/v0api/full.go +++ b/api/v0api/full.go @@ -716,6 +716,22 @@ type FullNode interface { CreateBackup(ctx context.Context, fpath string) error //perm:admin } +func OfferOrder(o api.QueryOffer, client address.Address) RetrievalOrder { + return RetrievalOrder{ + Root: o.Root, + Piece: o.Piece, + Size: o.Size, + Total: o.MinPrice, + UnsealPrice: o.UnsealPrice, + PaymentInterval: o.PaymentInterval, + PaymentIntervalIncrease: o.PaymentIntervalIncrease, + Client: client, + + Miner: o.Miner, + MinerPeer: &o.MinerPeer, + } +} + type RetrievalOrder struct { // TODO: make this less unixfs specific Root cid.Cid diff --git a/testplans/lotus-soup/testkit/retrieval.go b/testplans/lotus-soup/testkit/retrieval.go index de3dee6be..3d6683d00 100644 --- a/testplans/lotus-soup/testkit/retrieval.go +++ b/testplans/lotus-soup/testkit/retrieval.go @@ -11,6 +11,7 @@ import ( "time" "github.com/filecoin-project/lotus/api" + "github.com/filecoin-project/lotus/api/v0api" "github.com/ipfs/go-cid" files "github.com/ipfs/go-ipfs-files" ipld "github.com/ipfs/go-ipld-format" @@ -51,7 +52,7 @@ func RetrieveData(t *TestEnvironment, ctx context.Context, client api.FullNode, IsCAR: carExport, } t1 = time.Now() - err = client.ClientRetrieve(ctx, offers[0].Order(caddr), ref) + err = (&v0api.WrapperV1Full{FullNode: client}).ClientRetrieve(ctx, v0api.OfferOrder(offers[0], caddr), ref) if err != nil { return err }