feat(staking)!: add consensus and validator address codec in staking (#16959)

Co-authored-by: Facundo Medica <14063057+facundomedica@users.noreply.github.com>
This commit is contained in:
Julien Robert
2023-07-13 09:08:27 +00:00
committed by GitHub
co-authored by Facundo Medica
parent b1ac5768f7
commit e0be2b80fc
38 changed files with 185 additions and 145 deletions
@@ -76,7 +76,6 @@ func initFixture(tb testing.TB) *fixture {
authtypes.ProtoBaseAccount,
maccPerms,
addresscodec.NewBech32Codec(sdk.Bech32MainPrefix),
addresscodec.NewBech32Codec(sdk.Bech32PrefixValAddr),
sdk.Bech32MainPrefix,
authority.String(),
)
@@ -93,7 +92,7 @@ func initFixture(tb testing.TB) *fixture {
log.NewNopLogger(),
)
stakingKeeper := stakingkeeper.NewKeeper(cdc, runtime.NewKVStoreService(keys[stakingtypes.StoreKey]), accountKeeper, bankKeeper, authority.String())
stakingKeeper := stakingkeeper.NewKeeper(cdc, runtime.NewKVStoreService(keys[stakingtypes.StoreKey]), accountKeeper, bankKeeper, authority.String(), addresscodec.NewBech32Codec(sdk.Bech32PrefixValAddr), addresscodec.NewBech32Codec(sdk.Bech32PrefixConsAddr))
slashingKeeper := slashingkeeper.NewKeeper(cdc, &codec.LegacyAmino{}, runtime.NewKVStoreService(keys[slashingtypes.StoreKey]), stakingKeeper, authority.String())