feat(graphsync): unified graphsync instance
setup a single graphsync that loads from both the chainstore & client blockstore
This commit is contained in:
@@ -9,7 +9,8 @@ import (
|
||||
"github.com/ipfs/go-graphsync"
|
||||
blockstore "github.com/ipfs/go-ipfs-blockstore"
|
||||
exchange "github.com/ipfs/go-ipfs-exchange-interface"
|
||||
ipld "github.com/ipfs/go-ipld-format"
|
||||
format "github.com/ipfs/go-ipld-format"
|
||||
"github.com/ipld/go-ipld-prime"
|
||||
|
||||
"github.com/filecoin-project/go-statestore"
|
||||
)
|
||||
@@ -24,14 +25,16 @@ type ChainGCLocker blockstore.GCLocker
|
||||
type ChainGCBlockstore blockstore.GCBlockstore
|
||||
type ChainExchange exchange.Interface
|
||||
type ChainBlockService bserv.BlockService
|
||||
type ChainGraphsync graphsync.GraphExchange
|
||||
|
||||
type ClientFilestore *filestore.Filestore
|
||||
type ClientBlockstore blockstore.Blockstore
|
||||
type ClientDAG ipld.DAGService
|
||||
type ClientGraphsync graphsync.GraphExchange
|
||||
type ClientDAG format.DAGService
|
||||
type ClientDealStore *statestore.StateStore
|
||||
|
||||
type GraphsyncLoader ipld.Loader
|
||||
type GraphsyncStorer ipld.Storer
|
||||
type Graphsync graphsync.GraphExchange
|
||||
|
||||
// ClientDataTransfer is a data transfer manager for the client
|
||||
type ClientDataTransfer datatransfer.Manager
|
||||
|
||||
@@ -41,6 +44,6 @@ type ProviderPieceStore piecestore.PieceStore
|
||||
// ProviderDataTransfer is a data transfer manager for the provider
|
||||
type ProviderDataTransfer datatransfer.Manager
|
||||
|
||||
type StagingDAG ipld.DAGService
|
||||
type StagingDAG format.DAGService
|
||||
type StagingBlockstore blockstore.Blockstore
|
||||
type StagingGraphsync graphsync.GraphExchange
|
||||
|
||||
Reference in New Issue
Block a user