-
Notifications
You must be signed in to change notification settings - Fork 379
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
feat(cli): add listen flag #729
Conversation
fs.StringVar( | ||
&c.rpcListenAddr, | ||
"rpc.laddr", | ||
"tcp://127.0.0.1:26657", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This string is used 3 times in this file, and should be a constant. This constant should probably be located in a pkg, and not in the main.
if c.rpcListenAddr != "tcp://127.0.0.1:26657" { | ||
cfg.RPC.ListenAddress = c.rpcListenAddr | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not the way to manage this. Instead, you should parse flags directly against the unmarshalled config file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not in favor of this shortcut because it creates an inconsistent exception, doesn't reuse the existing constants, and isn't linked with the existing configuration structure.
Please, check #731.
Shall we close this? |
Description
This PR add a
-listen
flag to be able to listen on0.0.0.0
inside a docker container