mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-14 07:53:47 +00:00
added config.toml example values to different config setups, added TxArrivalWaitRaw string for toml and hcl value inputs
This commit is contained in:
parent
d56370b910
commit
070b13efbd
11 changed files with 19 additions and 7 deletions
|
|
@ -19,12 +19,13 @@ ethstats = "" # Reporting URL of a ethstats service (nodename:sec
|
||||||
"32000000" = "0x875500011e5eecc0c554f95d07b31cf59df4ca2505f4dbbfffa7d4e4da917c68"
|
"32000000" = "0x875500011e5eecc0c554f95d07b31cf59df4ca2505f4dbbfffa7d4e4da917c68"
|
||||||
|
|
||||||
[p2p]
|
[p2p]
|
||||||
maxpeers = 50 # Maximum number of network peers (network disabled if set to 0)
|
maxpeers = 50 # Maximum number of network peers (network disabled if set to 0)
|
||||||
maxpendpeers = 50 # Maximum number of pending connection attempts
|
maxpendpeers = 50 # Maximum number of pending connection attempts
|
||||||
bind = "0.0.0.0" # Network binding address
|
bind = "0.0.0.0" # Network binding address
|
||||||
port = 30303 # Network listening port
|
port = 30303 # Network listening port
|
||||||
nodiscover = false # Disables the peer discovery mechanism (manual peer addition)
|
nodiscover = false # Disables the peer discovery mechanism (manual peer addition)
|
||||||
nat = "any" # NAT port mapping mechanism (any|none|upnp|pmp|extip:<IP>)
|
nat = "any" # NAT port mapping mechanism (any|none|upnp|pmp|extip:<IP>)
|
||||||
|
txarrivalwait = "500ms" # Maximum duration to wait before requesting an announced transaction
|
||||||
[p2p.discovery]
|
[p2p.discovery]
|
||||||
v5disc = false # Enables the experimental RLPx V5 (Topic Discovery) mechanism
|
v5disc = false # Enables the experimental RLPx V5 (Topic Discovery) mechanism
|
||||||
bootnodes = [] # Comma separated enode URLs for P2P discovery bootstrap
|
bootnodes = [] # Comma separated enode URLs for P2P discovery bootstrap
|
||||||
|
|
|
||||||
|
|
@ -62,6 +62,7 @@ func (c *DumpconfigCommand) Run(args []string) int {
|
||||||
userConfig.Gpo.IgnorePriceRaw = userConfig.Gpo.IgnorePrice.String()
|
userConfig.Gpo.IgnorePriceRaw = userConfig.Gpo.IgnorePrice.String()
|
||||||
userConfig.Cache.RejournalRaw = userConfig.Cache.Rejournal.String()
|
userConfig.Cache.RejournalRaw = userConfig.Cache.Rejournal.String()
|
||||||
userConfig.Cache.TrieTimeoutRaw = userConfig.Cache.TrieTimeout.String()
|
userConfig.Cache.TrieTimeoutRaw = userConfig.Cache.TrieTimeout.String()
|
||||||
|
userConfig.P2P.TxArrivalWaitRaw = userConfig.P2P.TxArrivalWait.String()
|
||||||
|
|
||||||
if err := toml.NewEncoder(os.Stdout).Encode(userConfig); err != nil {
|
if err := toml.NewEncoder(os.Stdout).Encode(userConfig); err != nil {
|
||||||
c.UI.Error(err.Error())
|
c.UI.Error(err.Error())
|
||||||
|
|
|
||||||
|
|
@ -134,7 +134,8 @@ type P2PConfig struct {
|
||||||
|
|
||||||
// TxArrivalWait sets the maximum duration the transaction fetcher will wait for
|
// TxArrivalWait sets the maximum duration the transaction fetcher will wait for
|
||||||
// an announced transaction to arrive before explicitly requesting it
|
// an announced transaction to arrive before explicitly requesting it
|
||||||
TxArrivalWait time.Duration `hcl:"txarrivalwait,optional" toml:"txarrivalwait,optional"`
|
TxArrivalWait time.Duration `hcl:"-,optional" toml:"-"`
|
||||||
|
TxArrivalWaitRaw string `hcl:"txarrivalwait,optional" toml:"txarrivalwait,optional"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type P2PDiscovery struct {
|
type P2PDiscovery struct {
|
||||||
|
|
@ -636,6 +637,7 @@ func (c *Config) fillTimeDurations() error {
|
||||||
{"txpool.rejournal", &c.TxPool.Rejournal, &c.TxPool.RejournalRaw},
|
{"txpool.rejournal", &c.TxPool.Rejournal, &c.TxPool.RejournalRaw},
|
||||||
{"cache.rejournal", &c.Cache.Rejournal, &c.Cache.RejournalRaw},
|
{"cache.rejournal", &c.Cache.Rejournal, &c.Cache.RejournalRaw},
|
||||||
{"cache.timeout", &c.Cache.TrieTimeout, &c.Cache.TrieTimeoutRaw},
|
{"cache.timeout", &c.Cache.TrieTimeout, &c.Cache.TrieTimeoutRaw},
|
||||||
|
{"p2p.txarrivalwait", &c.P2P.TxArrivalWait, &c.P2P.TxArrivalWaitRaw},
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, x := range tds {
|
for _, x := range tds {
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,7 @@ gcmode = "archive"
|
||||||
# bind = "0.0.0.0"
|
# bind = "0.0.0.0"
|
||||||
# nodiscover = false
|
# nodiscover = false
|
||||||
# nat = "any"
|
# nat = "any"
|
||||||
|
# txarrivalwait = "500ms"
|
||||||
# [p2p.discovery]
|
# [p2p.discovery]
|
||||||
# v5disc = false
|
# v5disc = false
|
||||||
# bootnodes = []
|
# bootnodes = []
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,7 @@ syncmode = "full"
|
||||||
# bind = "0.0.0.0"
|
# bind = "0.0.0.0"
|
||||||
# nodiscover = false
|
# nodiscover = false
|
||||||
# nat = "any"
|
# nat = "any"
|
||||||
|
# txarrivalwait = "500ms"
|
||||||
# [p2p.discovery]
|
# [p2p.discovery]
|
||||||
# v5disc = false
|
# v5disc = false
|
||||||
# bootnodes = []
|
# bootnodes = []
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,7 @@ syncmode = "full"
|
||||||
# maxpendpeers = 50
|
# maxpendpeers = 50
|
||||||
# bind = "0.0.0.0"
|
# bind = "0.0.0.0"
|
||||||
# nat = "any"
|
# nat = "any"
|
||||||
|
# txarrivalwait = "500ms"
|
||||||
# [p2p.discovery]
|
# [p2p.discovery]
|
||||||
# v5disc = false
|
# v5disc = false
|
||||||
# bootnodes = []
|
# bootnodes = []
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,7 @@ syncmode = "full"
|
||||||
# bind = "0.0.0.0"
|
# bind = "0.0.0.0"
|
||||||
# nodiscover = false
|
# nodiscover = false
|
||||||
# nat = "any"
|
# nat = "any"
|
||||||
|
# txarrivalwait = "500ms"
|
||||||
# [p2p.discovery]
|
# [p2p.discovery]
|
||||||
# v5disc = false
|
# v5disc = false
|
||||||
# bootnodes = []
|
# bootnodes = []
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,7 @@ gcmode = "archive"
|
||||||
# bind = "0.0.0.0"
|
# bind = "0.0.0.0"
|
||||||
# nodiscover = false
|
# nodiscover = false
|
||||||
# nat = "any"
|
# nat = "any"
|
||||||
|
# txarrivalwait = "500ms"
|
||||||
# [p2p.discovery]
|
# [p2p.discovery]
|
||||||
# v5disc = false
|
# v5disc = false
|
||||||
# bootnodes = []
|
# bootnodes = []
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,7 @@ syncmode = "full"
|
||||||
# bind = "0.0.0.0"
|
# bind = "0.0.0.0"
|
||||||
# nodiscover = false
|
# nodiscover = false
|
||||||
# nat = "any"
|
# nat = "any"
|
||||||
|
# txarrivalwait = "500ms"
|
||||||
# [p2p.discovery]
|
# [p2p.discovery]
|
||||||
# v5disc = false
|
# v5disc = false
|
||||||
# bootnodes = []
|
# bootnodes = []
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,7 @@ syncmode = "full"
|
||||||
# maxpendpeers = 50
|
# maxpendpeers = 50
|
||||||
# bind = "0.0.0.0"
|
# bind = "0.0.0.0"
|
||||||
# nat = "any"
|
# nat = "any"
|
||||||
|
# txarrivalwait = "500ms"
|
||||||
# [p2p.discovery]
|
# [p2p.discovery]
|
||||||
# v5disc = false
|
# v5disc = false
|
||||||
# bootnodes = []
|
# bootnodes = []
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,7 @@ syncmode = "full"
|
||||||
# bind = "0.0.0.0"
|
# bind = "0.0.0.0"
|
||||||
# nodiscover = false
|
# nodiscover = false
|
||||||
# nat = "any"
|
# nat = "any"
|
||||||
|
# txarrivalwait = "500ms"
|
||||||
# [p2p.discovery]
|
# [p2p.discovery]
|
||||||
# v5disc = false
|
# v5disc = false
|
||||||
# bootnodes = []
|
# bootnodes = []
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue