Skip to content

Commit

Permalink
fix(eds/share): replacing fsmount with filemount registration (celest…
Browse files Browse the repository at this point in the history
  • Loading branch information
distractedm1nd authored Apr 3, 2023
1 parent 2718b1d commit 22802ce
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions share/eds/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ func NewStore(basepath string, ds datastore.Batching) (*Store, error) {
}

r := mount.NewRegistry()
err = r.Register("fs", &mount.FSMount{FS: os.DirFS(basepath + blocksPath)})
err = r.Register("fs", &mount.FileMount{Path: basepath + blocksPath})
if err != nil {
return nil, fmt.Errorf("failed to register FS mount on the registry: %w", err)
}
Expand Down Expand Up @@ -181,9 +181,8 @@ func (s *Store) Put(ctx context.Context, root share.DataHash, square *rsmt2d.Ext
}

ch := make(chan dagstore.ShardResult, 1)
err = s.dgstr.RegisterShard(ctx, shard.KeyFromString(key), &mount.FSMount{
FS: os.DirFS(s.basepath + blocksPath),
Path: key,
err = s.dgstr.RegisterShard(ctx, shard.KeyFromString(key), &mount.FileMount{
Path: s.basepath + blocksPath + key,
}, ch, dagstore.RegisterOpts{})
if err != nil {
return fmt.Errorf("failed to initiate shard registration: %w", err)
Expand Down

0 comments on commit 22802ce

Please sign in to comment.