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

Backmerge form main v0.2.x #208

Merged
merged 2 commits into from
Nov 11, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 22 additions & 1 deletion cmd/cheqd-noded/cmd/configure.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ func p2pCmd(defaultNodeHome string) *cobra.Command {
persistentPeersCmd(defaultNodeHome),
sendRateCmd(defaultNodeHome),
recvRateCmd(defaultNodeHome),
maxPacketMsgPayloadSizeCmd(defaultNodeHome))
maxPacketMsgPayloadSizeCmd(defaultNodeHome),
p2pLaddrCmd(defaultNodeHome))

return cmd
}
Expand Down Expand Up @@ -227,6 +228,26 @@ func maxPacketMsgPayloadSizeCmd(defaultNodeHome string) *cobra.Command {
return cmd
}

// p2pLaddrCmd returns configuration cobra Command.
func p2pLaddrCmd(defaultNodeHome string) *cobra.Command {
cmd := &cobra.Command{
Use: "laddr [value]",
Short: "Update p2p.laddr value in config.toml",
Args: cobra.ExactArgs(1),
RunE: func(cmd *cobra.Command, args []string) error {
clientCtx := client.GetClientContextFromCmd(cmd)

return updateTmConfig(clientCtx.HomeDir, func(config *tmcfg.Config) {
config.P2P.ListenAddress = args[0]
})
},
}

cmd.Flags().String(flags.FlagHome, defaultNodeHome, "The application home directory")

return cmd
}

// createEmptyBlocksCmd returns configuration cobra Command.
func createEmptyBlocksCmd(defaultNodeHome string) *cobra.Command {
cmd := &cobra.Command{
Expand Down