Use extracted go-filestore

This commit is contained in:
Łukasz Magiera
2019-07-15 17:08:18 +02:00
parent 1f6629e978
commit 041598dbb6
7 changed files with 28 additions and 305 deletions
+6 -6
View File
@@ -2,7 +2,7 @@ package node
import (
"context"
"github.com/ipfs/go-ipfs/filestore"
"github.com/ipfs/go-filestore"
"github.com/filecoin-project/go-lotus/api"
"github.com/filecoin-project/go-lotus/build"
@@ -20,12 +20,12 @@ import (
type API struct {
client.LocalStorage
Host host.Host
Chain *chain.ChainStore
PubSub *pubsub.PubSub
Host host.Host
Chain *chain.ChainStore
PubSub *pubsub.PubSub
Filestore *filestore.Filestore
Mpool *chain.MessagePool
Wallet *chain.Wallet
Mpool *chain.MessagePool
Wallet *chain.Wallet
}
func (a *API) ChainSubmitBlock(ctx context.Context, blk *chain.BlockMsg) error {
+1 -1
View File
@@ -3,7 +3,7 @@ package node
import (
"context"
"errors"
"github.com/ipfs/go-ipfs/filestore"
"github.com/ipfs/go-filestore"
"reflect"
"time"
+3 -4
View File
@@ -3,7 +3,7 @@ package client
import (
"context"
"github.com/filecoin-project/go-lotus/api"
"github.com/ipfs/go-ipfs/filestore"
"github.com/ipfs/go-filestore"
"go.uber.org/fx"
"os"
@@ -18,7 +18,7 @@ import (
type LocalStorage struct {
fx.In
LocalDAG ipld.DAGService
LocalDAG ipld.DAGService
Filestore *filestore.Filestore
}
@@ -59,7 +59,6 @@ func (s *LocalStorage) ClientImport(ctx context.Context, path string) (cid.Cid,
return nd.Cid(), bufferedDS.Commit()
}
func (s *LocalStorage) ClientListImports(ctx context.Context) ([]api.Import, error) {
next, err := filestore.ListAll(s.Filestore, false)
if err != nil {
@@ -84,4 +83,4 @@ func (s *LocalStorage) ClientListImports(ctx context.Context) ([]api.Import, err
Size: r.Size,
})
}
}
}
+1 -1
View File
@@ -4,7 +4,7 @@ import (
"context"
"github.com/ipfs/go-blockservice"
"github.com/ipfs/go-datastore/namespace"
"github.com/ipfs/go-ipfs/filestore"
"github.com/ipfs/go-filestore"
"github.com/ipfs/go-merkledag"
"path/filepath"