Remove all Chain GC wrappings/types
There is no practical way to do GC against the chainstore given the current state of affairs: remove all GC-related types for the time being.
This commit is contained in:
parent
7be7a9b5e3
commit
29817b6617
@ -45,12 +45,8 @@ func NewBlockstore(dstore ds.Batching) blockstore.Blockstore {
|
|||||||
// Alias so other packages don't have to import go-ipfs-blockstore
|
// Alias so other packages don't have to import go-ipfs-blockstore
|
||||||
type Blockstore = blockstore.Blockstore
|
type Blockstore = blockstore.Blockstore
|
||||||
type Viewer = blockstore.Viewer
|
type Viewer = blockstore.Viewer
|
||||||
type GCBlockstore = blockstore.GCBlockstore
|
|
||||||
type CacheOpts = blockstore.CacheOpts
|
type CacheOpts = blockstore.CacheOpts
|
||||||
type GCLocker = blockstore.GCLocker
|
|
||||||
|
|
||||||
var NewGCLocker = blockstore.NewGCLocker
|
|
||||||
var NewGCBlockstore = blockstore.NewGCBlockstore
|
|
||||||
var ErrNotFound = blockstore.ErrNotFound
|
var ErrNotFound = blockstore.ErrNotFound
|
||||||
|
|
||||||
func DefaultCacheOpts() CacheOpts {
|
func DefaultCacheOpts() CacheOpts {
|
||||||
|
@ -55,7 +55,6 @@ import (
|
|||||||
"github.com/filecoin-project/lotus/extern/sector-storage/storiface"
|
"github.com/filecoin-project/lotus/extern/sector-storage/storiface"
|
||||||
sealing "github.com/filecoin-project/lotus/extern/storage-sealing"
|
sealing "github.com/filecoin-project/lotus/extern/storage-sealing"
|
||||||
"github.com/filecoin-project/lotus/journal"
|
"github.com/filecoin-project/lotus/journal"
|
||||||
"github.com/filecoin-project/lotus/lib/blockstore"
|
|
||||||
"github.com/filecoin-project/lotus/lib/peermgr"
|
"github.com/filecoin-project/lotus/lib/peermgr"
|
||||||
_ "github.com/filecoin-project/lotus/lib/sigs/bls"
|
_ "github.com/filecoin-project/lotus/lib/sigs/bls"
|
||||||
_ "github.com/filecoin-project/lotus/lib/sigs/secp"
|
_ "github.com/filecoin-project/lotus/lib/sigs/secp"
|
||||||
@ -264,8 +263,6 @@ func Online() Option {
|
|||||||
Override(new(api.WalletAPI), From(new(wallet.MultiWallet))),
|
Override(new(api.WalletAPI), From(new(wallet.MultiWallet))),
|
||||||
Override(new(*messagesigner.MessageSigner), messagesigner.NewMessageSigner),
|
Override(new(*messagesigner.MessageSigner), messagesigner.NewMessageSigner),
|
||||||
|
|
||||||
Override(new(dtypes.ChainGCLocker), blockstore.NewGCLocker),
|
|
||||||
Override(new(dtypes.ChainGCBlockstore), modules.ChainGCBlockstore),
|
|
||||||
Override(new(dtypes.ChainBitswap), modules.ChainBitswap),
|
Override(new(dtypes.ChainBitswap), modules.ChainBitswap),
|
||||||
Override(new(dtypes.ChainBlockService), modules.ChainBlockService),
|
Override(new(dtypes.ChainBlockService), modules.ChainBlockService),
|
||||||
|
|
||||||
|
@ -38,7 +38,7 @@ import (
|
|||||||
"github.com/filecoin-project/lotus/node/repo"
|
"github.com/filecoin-project/lotus/node/repo"
|
||||||
)
|
)
|
||||||
|
|
||||||
func ChainBitswap(mctx helpers.MetricsCtx, lc fx.Lifecycle, host host.Host, rt routing.Routing, bs dtypes.ChainGCBlockstore) dtypes.ChainBitswap {
|
func ChainBitswap(mctx helpers.MetricsCtx, lc fx.Lifecycle, host host.Host, rt routing.Routing, bs dtypes.ChainBlockstore) 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"))
|
||||||
@ -91,10 +91,6 @@ func ChainRawBlockstore(lc fx.Lifecycle, mctx helpers.MetricsCtx, r repo.LockedR
|
|||||||
return cbs, nil
|
return cbs, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func ChainGCBlockstore(bs dtypes.ChainRawBlockstore, gcl dtypes.ChainGCLocker) dtypes.ChainGCBlockstore {
|
|
||||||
return blockstore.NewGCBlockstore(bs, gcl)
|
|
||||||
}
|
|
||||||
|
|
||||||
func ChainBlockService(bs dtypes.ChainRawBlockstore, rem dtypes.ChainBitswap) dtypes.ChainBlockService {
|
func ChainBlockService(bs dtypes.ChainRawBlockstore, rem dtypes.ChainBitswap) dtypes.ChainBlockService {
|
||||||
return blockservice.New(bs, rem)
|
return blockservice.New(bs, rem)
|
||||||
}
|
}
|
||||||
|
@ -26,8 +26,6 @@ type MetadataDS datastore.Batching
|
|||||||
type ChainRawBlockstore blockstore.Blockstore
|
type ChainRawBlockstore blockstore.Blockstore
|
||||||
type ChainBlockstore blockstore.Blockstore // optionally bitswap backed
|
type ChainBlockstore blockstore.Blockstore // optionally bitswap backed
|
||||||
|
|
||||||
type ChainGCLocker blockstore.GCLocker
|
|
||||||
type ChainGCBlockstore blockstore.GCBlockstore
|
|
||||||
type ChainBitswap exchange.Interface
|
type ChainBitswap exchange.Interface
|
||||||
type ChainBlockService bserv.BlockService
|
type ChainBlockService bserv.BlockService
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user