Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question about redundant setting of config values #96

Closed
rikonor opened this issue Aug 9, 2019 · 2 comments
Closed

Question about redundant setting of config values #96

rikonor opened this issue Aug 9, 2019 · 2 comments

Comments

@rikonor
Copy link

rikonor commented Aug 9, 2019

Hi,

Was just curious why these values are explicitly set, even though they're just being set to the default values?

gaia/cmd/gaiad/main.go

Lines 38 to 40 in 9c82ff2

config.SetBech32PrefixForAccount(sdk.Bech32PrefixAccAddr, sdk.Bech32PrefixAccPub)
config.SetBech32PrefixForValidator(sdk.Bech32PrefixValAddr, sdk.Bech32PrefixValPub)
config.SetBech32PrefixForConsensusNode(sdk.Bech32PrefixConsAddr, sdk.Bech32PrefixConsPub)

see config.go#L23 for the current defaults.

@alexanderbez
Copy link
Contributor

An application should set its own Bech32 prefixes through config.Set*. The reason why the config has those defaults already is so you can avoid having to do this (even though that's unadvisable).

@rikonor
Copy link
Author

rikonor commented Aug 9, 2019

I see - so this is just setting a good example given that most applications will be setting their own prefixes? Thanks for the quick reply.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants