Skip to content

Commit

Permalink
chore: apply simple reviews
Browse files Browse the repository at this point in the history
  • Loading branch information
dudong2 committed Jan 30, 2024
1 parent 31b1409 commit 9ad5d16
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 14 deletions.
3 changes: 3 additions & 0 deletions app/export.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,9 @@ func (app *EthermintApp) prepForZeroHeightGenesis(ctx sdk.Context, jailAllowedAd
}
return false
})
if err != nil {
panic(err)
}

// reinitialize all delegations
for _, del := range dels {
Expand Down
21 changes: 7 additions & 14 deletions rpc/namespaces/ethereum/eth/filters/filter_system.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,22 +44,15 @@ import (
var (
txEvents = tmtypes.QueryForEvent(tmtypes.EventTx).String()
headerEvents = tmtypes.QueryForEvent(tmtypes.EventNewBlockHeader).String()
evmEvents string
evmEvents = tmquery.MustCompile(
fmt.Sprintf("%s='%s' AND %s.%s='%s'",
tmtypes.EventTypeKey,
tmtypes.EventTx,
sdk.EventTypeMessage,
sdk.AttributeKeyModule, evmtypes.ModuleName),
).String()
)

func init() {
s := fmt.Sprintf("%s='%s' AND %s.%s='%s'",
tmtypes.EventTypeKey,
tmtypes.EventTx,
sdk.EventTypeMessage,
sdk.AttributeKeyModule, evmtypes.ModuleName)
q, err := tmquery.New(s)
if err != nil {
panic(fmt.Sprintf("failed to parse %s: %v", s, err))
}
evmEvents = q.String()
}

// EventSystem creates subscriptions, processes events and broadcasts them to the
// subscription which match the subscription criteria using the Tendermint's RPC client.
type EventSystem struct {
Expand Down

0 comments on commit 9ad5d16

Please sign in to comment.