Skip to content

Commit

Permalink
Merge pull request #208 from cheqd/main_v0.2.x
Browse files Browse the repository at this point in the history
Backmerge form main v0.2.x
  • Loading branch information
askolesov authored Nov 11, 2021
2 parents 177a8f4 + 47f5a14 commit f9be2fd
Showing 1 changed file with 22 additions and 1 deletion.
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

0 comments on commit f9be2fd

Please # to comment.