rename other Chain{Exchange=>Bitswap}; fix ChainBlock{s=>S}ervice().
This commit is contained in:
parent
453e826a0f
commit
878ffafb51
@ -238,8 +238,8 @@ func Online() Option {
|
||||
|
||||
Override(new(dtypes.ChainGCLocker), blockstore.NewGCLocker),
|
||||
Override(new(dtypes.ChainGCBlockstore), modules.ChainGCBlockstore),
|
||||
Override(new(dtypes.ChainExchange), modules.ChainExchange),
|
||||
Override(new(dtypes.ChainBlockService), modules.ChainBlockservice),
|
||||
Override(new(dtypes.ChainBitswap), modules.ChainBitswap),
|
||||
Override(new(dtypes.ChainBlockService), modules.ChainBlockService),
|
||||
|
||||
// Filecoin services
|
||||
Override(new(*chain.Syncer), modules.NewSyncer),
|
||||
|
@ -33,7 +33,7 @@ import (
|
||||
"github.com/filecoin-project/lotus/node/repo"
|
||||
)
|
||||
|
||||
func ChainExchange(mctx helpers.MetricsCtx, lc fx.Lifecycle, host host.Host, rt routing.Routing, bs dtypes.ChainGCBlockstore) dtypes.ChainExchange {
|
||||
func ChainBitswap(mctx helpers.MetricsCtx, lc fx.Lifecycle, host host.Host, rt routing.Routing, bs dtypes.ChainGCBlockstore) dtypes.ChainBitswap {
|
||||
// prefix protocol for chain bitswap
|
||||
// (so bitswap uses /chain/ipfs/bitswap/1.0.0 internally for chain sync stuff)
|
||||
bitswapNetwork := network.NewFromIpfsHost(host, rt, network.Prefix("/chain"))
|
||||
@ -83,7 +83,7 @@ func ChainGCBlockstore(bs dtypes.ChainBlockstore, gcl dtypes.ChainGCLocker) dtyp
|
||||
return blockstore.NewGCBlockstore(bs, gcl)
|
||||
}
|
||||
|
||||
func ChainBlockservice(bs dtypes.ChainBlockstore, rem dtypes.ChainExchange) dtypes.ChainBlockService {
|
||||
func ChainBlockService(bs dtypes.ChainBlockstore, rem dtypes.ChainBitswap) dtypes.ChainBlockService {
|
||||
return blockservice.New(bs, rem)
|
||||
}
|
||||
|
||||
|
@ -27,7 +27,7 @@ type ChainBlockstore blockstore.Blockstore
|
||||
|
||||
type ChainGCLocker blockstore.GCLocker
|
||||
type ChainGCBlockstore blockstore.GCBlockstore
|
||||
type ChainExchange exchange.Interface
|
||||
type ChainBitswap exchange.Interface
|
||||
type ChainBlockService bserv.BlockService
|
||||
|
||||
type ClientMultiDstore *multistore.MultiStore
|
||||
|
Loading…
Reference in New Issue
Block a user