Merge remote-tracking branch 'origin/master' into feat/datamodel-selector-retrieval

This commit is contained in:
Peter Rabbitson
2021-10-05 18:15:51 +02:00
120 changed files with 3978 additions and 645 deletions
+7 -1
View File
@@ -59,6 +59,7 @@ import (
"github.com/filecoin-project/specs-actors/v3/actors/builtin/market"
marketevents "github.com/filecoin-project/lotus/markets/loggers"
"github.com/filecoin-project/lotus/node/config"
"github.com/filecoin-project/lotus/node/repo/imports"
"github.com/filecoin-project/lotus/api"
@@ -1011,6 +1012,7 @@ func (a *API) clientRetrieve(ctx context.Context, order api.RetrievalOrder, ref
Root: order.Root,
Selector: sel,
}},
car.MaxTraversalLinks(config.MaxTraversalLinks),
).Write(f)
if err != nil {
finish(err)
@@ -1302,7 +1304,11 @@ func (a *API) ClientGenCar(ctx context.Context, ref api.FileRef, outputPath stri
allSelector := ssb.ExploreRecursive(
selector.RecursionLimitNone(),
ssb.ExploreAll(ssb.ExploreRecursiveEdge())).Node()
sc := car.NewSelectiveCar(ctx, fs, []car.Dag{{Root: root, Selector: allSelector}})
sc := car.NewSelectiveCar(ctx,
fs,
[]car.Dag{{Root: root, Selector: allSelector}},
car.MaxTraversalLinks(config.MaxTraversalLinks),
)
f, err := os.Create(outputPath)
if err != nil {
return err