separate LMDB options for hotstore and tracking stores

This commit is contained in:
vyzo 2021-02-27 13:19:31 +02:00
parent 2c1a9781cf
commit b83994797a
3 changed files with 6 additions and 5 deletions

View File

@ -611,9 +611,9 @@ func Repo(r repo.Repo) Option {
Override(new(dtypes.UniversalBlockstore), modules.UniversalBlockstore),
If(cfg.Splitstore,
If(cfg.UseLMDB,
If(cfg.UseLMDBHotstore,
Override(new(dtypes.HotBlockstore), modules.LMDBHotBlockstore)),
If(!cfg.UseLMDB,
If(!cfg.UseLMDBHotstore,
Override(new(dtypes.HotBlockstore), modules.BadgerHotBlockstore)),
Override(new(dtypes.SplitBlockstore), modules.SplitBlockstore(cfg)),
Override(new(dtypes.ChainBlockstore), modules.ChainSplitBlockstore),

View File

@ -122,7 +122,8 @@ type Pubsub struct {
type Blockstore struct {
Splitstore bool
UseLMDB bool
UseLMDBHotstore bool
UseLMDBTracking bool
}
// // Full Node

View File

@ -103,7 +103,7 @@ func SplitBlockstore(cfg *config.Blockstore) func(lc fx.Lifecycle, r repo.Locked
return nil, err
}
ss, err := splitstore.NewSplitStore(path, ds, cold, hot, cfg.UseLMDB)
ss, err := splitstore.NewSplitStore(path, ds, cold, hot, cfg.UseLMDBTracking)
if err != nil {
return nil, err
}