From b83994797a797104538c272c0397038c7fc7236b Mon Sep 17 00:00:00 2001 From: vyzo Date: Sat, 27 Feb 2021 13:19:31 +0200 Subject: [PATCH] separate LMDB options for hotstore and tracking stores --- node/builder.go | 4 ++-- node/config/def.go | 5 +++-- node/modules/blockstore.go | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/node/builder.go b/node/builder.go index 7f13aaee0..e0f7fcfa1 100644 --- a/node/builder.go +++ b/node/builder.go @@ -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), diff --git a/node/config/def.go b/node/config/def.go index 56bba08ed..21141e279 100644 --- a/node/config/def.go +++ b/node/config/def.go @@ -121,8 +121,9 @@ type Pubsub struct { } type Blockstore struct { - Splitstore bool - UseLMDB bool + Splitstore bool + UseLMDBHotstore bool + UseLMDBTracking bool } // // Full Node diff --git a/node/modules/blockstore.go b/node/modules/blockstore.go index f82fe4602..7b3bce5e1 100644 --- a/node/modules/blockstore.go +++ b/node/modules/blockstore.go @@ -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 }