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

feat(cli): add listen flag #729

Closed
wants to merge 1 commit into from
Closed

Conversation

albttx
Copy link
Member

@albttx albttx commented Apr 11, 2023

Description

This PR add a -listen flag to be able to listen on 0.0.0.0 inside a docker container

@albttx albttx requested a review from a team as a code owner April 11, 2023 17:06
fs.StringVar(
&c.rpcListenAddr,
"rpc.laddr",
"tcp://127.0.0.1:26657",
Copy link
Member

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.

Comment on lines +127 to +129
if c.rpcListenAddr != "tcp://127.0.0.1:26657" {
cfg.RPC.ListenAddress = c.rpcListenAddr
}
Copy link
Member

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.

Copy link
Member

@moul moul left a 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.

@moul moul mentioned this pull request Apr 11, 2023
8 tasks
@moul moul mentioned this pull request May 19, 2023
6 tasks
@thehowl
Copy link
Member

thehowl commented Jun 16, 2023

Shall we close this?

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

Successfully merging this pull request may close these issues.

3 participants