add mpool journal events; fix dependency injection.

This commit is contained in:
Raúl Kripalani
2020-07-20 16:37:32 +01:00
parent 226786c1da
commit 7459ec6bba
4 changed files with 58 additions and 6 deletions
+1 -1
View File
@@ -155,7 +155,7 @@ func defaults() []Option {
Override(new(journal.Journal), journal.OpenFSJournal),
Override(new(journal.DisabledEvents), journal.DisabledEvents{}),
Override(InitJournalKey, func(j *journal.Journal) { /* forces the creation of the journal at startup */ }),
Override(InitJournalKey, func(j journal.Journal) { /* forces the creation of the journal at startup */ }),
// Filecoin modules
}
+2 -2
View File
@@ -47,9 +47,9 @@ func ChainExchange(mctx helpers.MetricsCtx, lc fx.Lifecycle, host host.Host, rt
return exch
}
func MessagePool(lc fx.Lifecycle, sm *stmgr.StateManager, ps *pubsub.PubSub, ds dtypes.MetadataDS, nn dtypes.NetworkName) (*messagepool.MessagePool, error) {
func MessagePool(lc fx.Lifecycle, sm *stmgr.StateManager, ps *pubsub.PubSub, ds dtypes.MetadataDS, nn dtypes.NetworkName, jrnl journal.Journal) (*messagepool.MessagePool, error) {
mpp := messagepool.NewProvider(sm, ps)
mp, err := messagepool.New(mpp, ds, nn)
mp, err := messagepool.New(mpp, ds, nn, jrnl)
if err != nil {
return nil, xerrors.Errorf("constructing mpool: %w", err)
}