refactor(x/evidence): accept address codec in constructor (#21859)

This commit is contained in:
Marko
2024-09-25 09:42:27 +00:00
committed by GitHub
parent c971f75acf
commit d54f6fa95b
14 changed files with 39 additions and 42 deletions
+7 -1
View File
@@ -442,7 +442,13 @@ func NewSimApp(
// create evidence keeper with router
evidenceKeeper := evidencekeeper.NewKeeper(
appCodec, runtime.NewEnvironment(runtime.NewKVStoreService(keys[evidencetypes.StoreKey]), logger.With(log.ModuleKey, "x/evidence"), runtime.EnvWithMsgRouterService(app.MsgServiceRouter()), runtime.EnvWithQueryRouterService(app.GRPCQueryRouter())), app.StakingKeeper, app.SlashingKeeper, app.ConsensusParamsKeeper, app.AuthKeeper.AddressCodec(),
appCodec,
runtime.NewEnvironment(runtime.NewKVStoreService(keys[evidencetypes.StoreKey]), logger.With(log.ModuleKey, "x/evidence"), runtime.EnvWithMsgRouterService(app.MsgServiceRouter()), runtime.EnvWithQueryRouterService(app.GRPCQueryRouter())),
app.StakingKeeper,
app.SlashingKeeper,
app.ConsensusParamsKeeper,
app.AuthKeeper.AddressCodec(),
app.StakingKeeper.ConsensusAddressCodec(),
)
// If evidence needs to be handled for the app, set routes in router here and seal
app.EvidenceKeeper = *evidenceKeeper