Skip to content

Commit

Permalink
fix(halo/evmstaking2): fix EVM event hijacking (#2664)
Browse files Browse the repository at this point in the history
The current event processor seems to steal the EVM. We need to remove
the injection of the processor if the valsync buffering is on.

issue: #2525
  • Loading branch information
chmllr authored Dec 10, 2024
1 parent 33b18fa commit 276f54a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
2 changes: 1 addition & 1 deletion halo/app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ func newApp(
) (*App, error) {
depCfg := depinject.Configs(
appConfig(ctx, network),
depinject.Provide(diProviders...),
depinject.Provide(diProviders(ctx)...),
depinject.Supply(
logger,
engineCl,
Expand Down
18 changes: 13 additions & 5 deletions halo/app/app_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -238,11 +238,19 @@ var (

// diProviders defines a list of depinject provider functions.
// These are non-cosmos module constructors used in halo's app wiring.
diProviders = []any{
evmslashing.DIProvide,
// TODO(christian): remove later, but seems like it can stay here even if feature is enabled
evmstaking.DIProvide,
evmupgrade.DIProvide,
diProviders = func(ctx context.Context) []any {
if feature.FlagEVMStakingModule.Enabled(ctx) {
return []any{
evmslashing.DIProvide,
evmupgrade.DIProvide,
}
}

return []any{
evmslashing.DIProvide,
evmstaking.DIProvide,
evmupgrade.DIProvide,
}
}
)

Expand Down

0 comments on commit 276f54a

Please sign in to comment.