rename other Chain{Exchange=>Bitswap}; fix ChainBlock{s=>S}ervice().

This commit is contained in:
Raúl Kripalani 2020-09-07 20:20:23 +01:00
parent 453e826a0f
commit 878ffafb51
3 changed files with 5 additions and 5 deletions

View File

@ -238,8 +238,8 @@ func Online() Option {
Override(new(dtypes.ChainGCLocker), blockstore.NewGCLocker), Override(new(dtypes.ChainGCLocker), blockstore.NewGCLocker),
Override(new(dtypes.ChainGCBlockstore), modules.ChainGCBlockstore), Override(new(dtypes.ChainGCBlockstore), modules.ChainGCBlockstore),
Override(new(dtypes.ChainExchange), modules.ChainExchange), Override(new(dtypes.ChainBitswap), modules.ChainBitswap),
Override(new(dtypes.ChainBlockService), modules.ChainBlockservice), Override(new(dtypes.ChainBlockService), modules.ChainBlockService),
// Filecoin services // Filecoin services
Override(new(*chain.Syncer), modules.NewSyncer), Override(new(*chain.Syncer), modules.NewSyncer),

View File

@ -33,7 +33,7 @@ import (
"github.com/filecoin-project/lotus/node/repo" "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 // prefix protocol for chain bitswap
// (so bitswap uses /chain/ipfs/bitswap/1.0.0 internally for chain sync stuff) // (so bitswap uses /chain/ipfs/bitswap/1.0.0 internally for chain sync stuff)
bitswapNetwork := network.NewFromIpfsHost(host, rt, network.Prefix("/chain")) 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) 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) return blockservice.New(bs, rem)
} }

View File

@ -27,7 +27,7 @@ type ChainBlockstore blockstore.Blockstore
type ChainGCLocker blockstore.GCLocker type ChainGCLocker blockstore.GCLocker
type ChainGCBlockstore blockstore.GCBlockstore type ChainGCBlockstore blockstore.GCBlockstore
type ChainExchange exchange.Interface type ChainBitswap exchange.Interface
type ChainBlockService bserv.BlockService type ChainBlockService bserv.BlockService
type ClientMultiDstore *multistore.MultiStore type ClientMultiDstore *multistore.MultiStore