From 49d0c2d15e9ceef1e44b7de54ad504c0529c55d8 Mon Sep 17 00:00:00 2001 From: Sergi Rene Date: Wed, 15 May 2024 21:25:18 +0200 Subject: [PATCH] param renamed --- config/defaults.go | 2 +- config/p2p.go | 2 +- config/toml.go | 2 +- p2p/client.go | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/config/defaults.go b/config/defaults.go index 64f2b6fc0..8d4be6473 100644 --- a/config/defaults.go +++ b/config/defaults.go @@ -42,7 +42,7 @@ func DefaultConfig(home, chainId string) *NodeConfig { BootstrapTime: 30 * time.Second, ListenAddress: DefaultListenAddress, BootstrapNodes: "", - Advertising: true, + AdvertisingEnabled: true, }, } diff --git a/config/p2p.go b/config/p2p.go index 4f0f9f748..6ea8f3c2f 100644 --- a/config/p2p.go +++ b/config/p2p.go @@ -16,7 +16,7 @@ type P2PConfig struct { //Time interval a node tries to bootstrap again, in case no nodes connected BootstrapTime time.Duration `mapstructure:"p2p_bootstrap_time"` //Param used to enable the advertisement of the node to be part of the P2P network in the DHT - Advertising bool `mapstructure:"p2p_advertising"` + AdvertisingEnabled bool `mapstructure:"p2p_advertising_enabled"` } // Validate P2PConfig diff --git a/config/toml.go b/config/toml.go index e180ef2a2..fb99ef967 100644 --- a/config/toml.go +++ b/config/toml.go @@ -101,7 +101,7 @@ p2p_gossiped_blocks_cache_size = {{ .P2PConfig.GossipedBlocksCacheSize }} p2p_bootstrap_time = "{{ .P2PConfig.BootstrapTime }}" # set to false to disable advertising the node to the P2P network -p2p_advertising= "{{ .P2PConfig.Advertising }}" +p2p_advertising_enabled= "{{ .P2PConfig.AdvertisingEnabled }}" #celestia config example: diff --git a/p2p/client.go b/p2p/client.go index 8d8a65c29..15da8bb33 100644 --- a/p2p/client.go +++ b/p2p/client.go @@ -264,7 +264,7 @@ func (c *Client) peerDiscovery(ctx context.Context) error { return err } - if c.conf.Advertising { + if c.conf.AdvertisingEnabled { err = c.advertise(ctx) if err != nil { return err