add NilJournal; fix call sites to ChainStore constructor.

This commit is contained in:
Raúl Kripalani
2020-07-17 19:10:47 +01:00
parent 4bcf01938c
commit becbff0b13
9 changed files with 37 additions and 8 deletions
+3 -2
View File
@@ -26,6 +26,7 @@ import (
"github.com/filecoin-project/lotus/chain/stmgr"
"github.com/filecoin-project/lotus/chain/store"
"github.com/filecoin-project/lotus/chain/types"
"github.com/filecoin-project/lotus/journal"
"github.com/filecoin-project/lotus/node/modules/dtypes"
"github.com/filecoin-project/lotus/node/modules/helpers"
"github.com/filecoin-project/lotus/node/repo"
@@ -83,8 +84,8 @@ func ChainBlockservice(bs dtypes.ChainBlockstore, rem dtypes.ChainExchange) dtyp
return blockservice.New(bs, rem)
}
func ChainStore(lc fx.Lifecycle, bs dtypes.ChainBlockstore, ds dtypes.MetadataDS, syscalls runtime.Syscalls) *store.ChainStore {
chain := store.NewChainStore(bs, ds, syscalls)
func ChainStore(lc fx.Lifecycle, bs dtypes.ChainBlockstore, ds dtypes.MetadataDS, syscalls runtime.Syscalls, journal journal.Journal) *store.ChainStore {
chain := store.NewChainStore(bs, ds, syscalls, journal)
if err := chain.Load(); err != nil {
log.Warnf("loading chain state from disk: %s", err)