diff --git a/app/keepers.go b/app/keepers.go index 88bf66149..dddc98447 100644 --- a/app/keepers.go +++ b/app/keepers.go @@ -286,13 +286,13 @@ func initEvmKeeper(appCodec codec.Codec, keys map[string]*sdk.KVStoreKey, keeper func initNexusKeeper(appCodec codec.Codec, keys map[string]*sdk.KVStoreKey, keepers *keeperCache) *nexusKeeper.Keeper { // setting validator will finalize all by sealing it // no more validators can be added - addressValidator := nexusTypes.NewAddressValidators(). + addressValidators := nexusTypes.NewAddressValidators(). AddAddressValidator(evmTypes.ModuleName, evmKeeper.NewAddressValidator()). AddAddressValidator(axelarnetTypes.ModuleName, axelarnetKeeper.NewAddressValidator(getKeeper[axelarnetKeeper.Keeper](keepers))) - addressValidator.Seal() + addressValidators.Seal() nexusK := nexusKeeper.NewKeeper(appCodec, keys[nexusTypes.StoreKey], keepers.getSubspace(nexusTypes.ModuleName)) - nexusK.SetAddressValidators(addressValidator) + nexusK.SetAddressValidators(addressValidators) return &nexusK } diff --git a/x/nexus/types/address_validator.go b/x/nexus/types/address_validator.go index 62e1d8f50..cbe982910 100644 --- a/x/nexus/types/address_validator.go +++ b/x/nexus/types/address_validator.go @@ -44,7 +44,7 @@ func (r *AddressValidators) AddAddressValidator(module string, validator exporte panic("module name cannot be an empty string") } - if r.HasAddressValidator(module) { + if r.hasAddressValidator(module) { panic(fmt.Sprintf("validator for module %s has already been registered", module)) } @@ -52,8 +52,8 @@ func (r *AddressValidators) AddAddressValidator(module string, validator exporte return r } -// HasAddressValidator returns true if a validator is registered for the given module -func (r *AddressValidators) HasAddressValidator(module string) bool { +// hasAddressValidator returns true if a validator is registered for the given module +func (r *AddressValidators) hasAddressValidator(module string) bool { _, err := r.GetAddressValidator(module) return err == nil }