Skip to content

Commit

Permalink
params rename
Browse files Browse the repository at this point in the history
  • Loading branch information
srene committed May 14, 2024
1 parent abf5bc2 commit 923ccbf
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
7 changes: 5 additions & 2 deletions config/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,13 @@ func BindDymintFlags(cmd *cobra.Command, v *viper.Viper) error {
if err := v.BindPFlag("p2p_listen_address", cmd.Flags().Lookup(FlagP2PListenAddress)); err != nil {
return err
}
if err := v.BindPFlag("gossiped_blocks_cache_size", cmd.Flags().Lookup(FlagP2PGossipCacheSize)); err != nil {
if err := v.BindPFlag("p2p_gossiped_blocks_cache_size", cmd.Flags().Lookup(FlagP2PGossipCacheSize)); err != nil {
return err
}
if err := v.BindPFlag("bootstrap_time", cmd.Flags().Lookup(FlagP2PBootstrapTime)); err != nil {
if err := v.BindPFlag("p2p_bootstrap_time", cmd.Flags().Lookup(FlagP2PBootstrapTime)); err != nil {
return err
}
if err := v.BindPFlag("p2p_bootstrap_nodes", cmd.Flags().Lookup(FlagP2PBootstrapNodes)); err != nil {
return err
}

Expand Down
4 changes: 2 additions & 2 deletions config/p2p.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ type P2PConfig struct {
//List of nodes used for P2P bootstrapping
BootstrapNodes string `mapstructure:"p2p_bootstrap_nodes"`
//Size of the Gossipsub router cache
GossipedBlocksCacheSize int `mapstructure:"gossiped_blocks_cache_size"`
GossipedBlocksCacheSize int `mapstructure:"p2p_gossiped_blocks_cache_size"`
//Time interval a node tries to bootstrap again, in case no nodes connected
BootstrapTime time.Duration `mapstructure:"bootstrap_time"`
BootstrapTime time.Duration `mapstructure:"p2p_bootstrap_time"`
}

// Validate P2PConfig
Expand Down
6 changes: 4 additions & 2 deletions config/toml.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,12 @@ p2p_listen_address = "{{ .P2P.ListenAddress }}"
p2p_bootstrap_nodes = "{{ .P2P.BootstrapNodes }}"
# max number of cached messages by gossipsub protocol
gossiped_blocks_cache_size = {{ .P2P.GossipedBlocksCacheSize }}
p2p_gossiped_blocks_cache_size = {{ .P2P.GossipedBlocksCacheSize }}
# time interval to check if no p2p nodes are connected to bootstrap again
bootstrap_time = "{{ .P2P.BootstrapTime }}"
p2p_bootstrap_time = "{{ .P2P.BootstrapTime }}"
#celestia config example:
# da_config = "{\"base_url\":\"http:\/\/127.0.0.1:26658\",\"timeout\":5000000000,\"gas_prices\":0.1,\"auth_token\":\"TOKEN\",\"backoff\":{\"initial_delay\":6000000000,\"max_delay\":6000000000,\"growth_factor\":2},\"retry_attempts\":4,\"retry_delay\":3000000000}"
Expand Down

0 comments on commit 923ccbf

Please sign in to comment.