diff --git a/cli/cmd.go b/cli/cmd.go index ea548076e..a67dc40ce 100644 --- a/cli/cmd.go +++ b/cli/cmd.go @@ -59,6 +59,7 @@ func reqContext(cctx *cli.Context) context.Context { } var Commands = []*cli.Command{ + clientCmd, chainCmd, netCmd, versionCmd, diff --git a/node/client/import.go b/node/client/import.go index 6daf34faf..fa96cc2d2 100644 --- a/node/client/import.go +++ b/node/client/import.go @@ -40,8 +40,8 @@ func (s *LocalStorage) ClientImport(ctx context.Context, path string) (cid.Cid, Maxlinks: ihelper.DefaultLinksPerBlock, RawLeaves: true, CidBuilder: nil, - Dagserv: bufferedDS, // flush? - NoCopy: false, + Dagserv: bufferedDS, + NoCopy: true, } db, err := params.New(chunker.DefaultSplitter(file)) diff --git a/node/modules/core.go b/node/modules/core.go index b31803194..62795277c 100644 --- a/node/modules/core.go +++ b/node/modules/core.go @@ -87,6 +87,8 @@ func ClientDAG(lc fx.Lifecycle, r repo.LockedRepo) (ipld.DAGService, error) { blocks := namespace.Wrap(clientds, datastore.NewKey("blocks")) fm := filestore.NewFileManager(clientds, filepath.Dir(r.Path())) + fm.AllowFiles = true + // TODO: fm.AllowUrls (needs more code in client import) bs := blockstore.NewBlockstore(blocks) fstore := filestore.NewFilestore(bs, fm) diff --git a/node/repo/fsrepo.go b/node/repo/fsrepo.go index 6fdb7bae4..b72160b93 100644 --- a/node/repo/fsrepo.go +++ b/node/repo/fsrepo.go @@ -151,6 +151,9 @@ func (fsr *fsLockedRepo) stillValid() error { func (fsr *fsLockedRepo) Datastore(ns string) (datastore.Batching, error) { fsr.dsOnce.Do(func() { fsr.ds, fsr.dsErr = badger.NewDatastore(fsr.join(fsDatastore), nil) + /*if fsr.dsErr == nil { + fsr.ds = datastore.NewLogDatastore(fsr.ds, "fsrepo") + }*/ }) if fsr.dsErr != nil { return nil, fsr.dsErr