Skip to content

Commit

Permalink
address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
cgorenflo committed Nov 11, 2023
1 parent 535bff5 commit 536eafc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions app/keepers.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
6 changes: 3 additions & 3 deletions x/nexus/types/address_validator.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,16 +44,16 @@ 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))
}

r.validators[module] = validator
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
}
Expand Down

0 comments on commit 536eafc

Please sign in to comment.