rename blockstores for consistency.
This commit is contained in:
@@ -44,7 +44,7 @@ func ChainBitswap(mctx helpers.MetricsCtx, lc fx.Lifecycle, host host.Host, rt r
|
||||
|
||||
// Write all incoming bitswap blocks into a temporary blockstore for two
|
||||
// block times. If they validate, they'll be persisted later.
|
||||
cache := blockstore.NewTimedCacheBS(2 * time.Duration(build.BlockDelaySecs) * time.Second)
|
||||
cache := blockstore.NewTimedCacheBlockstore(2 * time.Duration(build.BlockDelaySecs) * time.Second)
|
||||
lc.Append(fx.Hook{OnStop: cache.Stop, OnStart: cache.Start})
|
||||
|
||||
bitswapBs := blockstore.NewTieredBstore(bs, cache)
|
||||
|
||||
@@ -25,9 +25,9 @@ func IpfsClientBlockstore(ipfsMaddr string, onlineMode bool) func(helpers.Metric
|
||||
if err != nil {
|
||||
return nil, xerrors.Errorf("parsing ipfs multiaddr: %w", err)
|
||||
}
|
||||
ipfsbs, err = blockstore.NewRemoteIpfsBstore(helpers.LifecycleCtx(mctx, lc), ma, onlineMode)
|
||||
ipfsbs, err = blockstore.NewRemoteIPFSBlockstore(helpers.LifecycleCtx(mctx, lc), ma, onlineMode)
|
||||
} else {
|
||||
ipfsbs, err = blockstore.NewIpfsBstore(helpers.LifecycleCtx(mctx, lc), onlineMode)
|
||||
ipfsbs, err = blockstore.NewLocalIPFSBlockstore(helpers.LifecycleCtx(mctx, lc), onlineMode)
|
||||
}
|
||||
if err != nil {
|
||||
return nil, xerrors.Errorf("constructing ipfs blockstore: %w", err)
|
||||
|
||||
@@ -160,7 +160,7 @@ func NewMemory(opts *MemRepoOptions) *MemRepo {
|
||||
|
||||
return &MemRepo{
|
||||
repoLock: make(chan struct{}, 1),
|
||||
blockstore: blockstore.WrapIDStore(blockstore.NewTemporarySync()),
|
||||
blockstore: blockstore.WrapIDStore(blockstore.NewMemorySync()),
|
||||
datastore: opts.Ds,
|
||||
configF: opts.ConfigF,
|
||||
keystore: opts.KeyStore,
|
||||
|
||||
Reference in New Issue
Block a user