integrate dagstore

This commit is contained in:
aarshkshah1992
2021-07-07 11:11:29 +05:30
parent e041fe130b
commit ca2d441b6d
5 changed files with 65 additions and 5 deletions
+6
View File
@@ -7,6 +7,7 @@ import (
"path/filepath"
"time"
"github.com/filecoin-project/lotus/node/repo/retrievalstoremgr"
"go.uber.org/fx"
"golang.org/x/xerrors"
@@ -209,3 +210,8 @@ func RetrievalClient(lc fx.Lifecycle, h host.Host, r repo.LockedRepo, dt dtypes.
})
return client, nil
}
// ClientBlockstoreRetrievalStoreManager is the default version of the RetrievalStoreManager that runs on multistore
func ClientBlockstoreRetrievalStoreManager(bs dtypes.ClientBlockstore) dtypes.ClientRetrievalStoreManager {
return retrievalstoremgr.NewBlockstoreRetrievalStoreManager(bs)
}
+2
View File
@@ -1,6 +1,7 @@
package dtypes
import (
"github.com/filecoin-project/lotus/node/repo/retrievalstoremgr"
bserv "github.com/ipfs/go-blockservice"
"github.com/ipfs/go-datastore"
"github.com/ipfs/go-graphsync"
@@ -70,6 +71,7 @@ type ClientBlockstore blockstore.BasicBlockstore
type ClientDealStore *statestore.StateStore
type ClientRequestValidator *requestvalidation.UnifiedRequestValidator
type ClientDatastore datastore.Batching
type ClientRetrievalStoreManager retrievalstoremgr.RetrievalStoreManager
type Graphsync graphsync.GraphExchange