Skip to content
This repository has been archived by the owner on Dec 20, 2023. It is now read-only.

Commit

Permalink
fixes a bug for which events weren't being stored (#195)
Browse files Browse the repository at this point in the history
  • Loading branch information
adlrocha authored Jun 28, 2023
1 parent ef514a1 commit f6d2599
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 16 deletions.
2 changes: 1 addition & 1 deletion cmd/eudico/daemon.go
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ func eudicoDaemonAction(consensusAlgorithm global.ConsensusAlgorithm) func(*cli.
app := fx.New(
fxProviders,
fx.Populate(&rpcStopper),
fxmodules.Invokes(&cfg.Common, cctx.Bool("bootstrap"), isMirValidator),
fxmodules.Invokes(cfg, cctx.Bool("bootstrap"), isMirValidator),
// Debugging of the dependency graph
fx.Invoke(
func(dotGraph fx.DotGraph) {
Expand Down
2 changes: 1 addition & 1 deletion cmd/lotus/eudico.go
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ func eudicoDaemonAction(cctx *cli.Context) error {
app := fx.New(
fxProviders,
fx.Populate(&rpcStopper),
fxmodules.Invokes(&cfg.Common, cctx.Bool("bootstrap"), isMirValidator),
fxmodules.Invokes(cfg, cctx.Bool("bootstrap"), isMirValidator),
// Debugging of the dependency graph
fx.Invoke(
func(dotGraph fx.DotGraph) {
Expand Down
27 changes: 14 additions & 13 deletions eudico-core/fxmodules/invokes.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,24 @@ import (
"github.com/filecoin-project/lotus/paychmgr/settler"
)

func Invokes(cfg *config.Common, isBootstrap bool, isMirValidator bool) fx.Option {
func Invokes(cfg *config.FullNode, isBootstrap bool, isMirValidator bool) fx.Option {
return fx.Module("invokes",
fx.Invoke(
modules.MemoryWatchdog, // 1 defaults
modules.CheckFdLimit(build.DefaultFDLimit), // 2 defaults
lp2p.PstoreAddSelfKeys, // 3 libp2p
lp2p.StartListening(cfg.Libp2p.ListenAddresses), // 4 common config
modules.DoSetGenesis, // 6
modules.RunHello, // 7
modules.RunChainExchange, // 8
modules.HandleIncomingMessages, // 12
modules.HandleMigrateClientFunds, // 13
modules.HandlePaychManager, // 14
modules.RelayIndexerMessages, // 15
settler.SettlePaymentChannels, // 24
modules.MemoryWatchdog, // 1 defaults
modules.CheckFdLimit(build.DefaultFDLimit), // 2 defaults
lp2p.PstoreAddSelfKeys, // 3 libp2p
lp2p.StartListening(cfg.Common.Libp2p.ListenAddresses), // 4 common config
modules.DoSetGenesis, // 6
modules.RunHello, // 7
modules.RunChainExchange, // 8
modules.HandleIncomingMessages, // 12
modules.HandleMigrateClientFunds, // 13
modules.HandlePaychManager, // 14
modules.RelayIndexerMessages, // 15
settler.SettlePaymentChannels, // 24
),
fxOptional(isBootstrap, fx.Invoke(modules.RunPeerMgr)), // 10
fxOptional(!isMirValidator, fx.Invoke(modules.HandleIncomingBlocks)), // 11
fxOptional(cfg.Fevm.EnableEthRPC, fx.Invoke(modules.EnableStoringEvents)),
)
}
2 changes: 1 addition & 1 deletion itests/kit/ensemble.go
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,7 @@ func (n *Ensemble) Start() *Ensemble {

app := fx.New(
fxProviders,
fxmodules.Invokes(&cfg.Common, false, !full.options.learner),
fxmodules.Invokes(cfg, false, !full.options.learner),
fx.Invoke(func(fullNode impl.FullNodeAPI) {
full.FullNode = &fullNode
}),
Expand Down

0 comments on commit f6d2599

Please sign in to comment.