From c585676e62c00a0a91b74f623d36a51ffe371b8b Mon Sep 17 00:00:00 2001 From: Afr Schoe <58883403+q9f@users.noreply.github.com> Date: Wed, 17 Jan 2024 18:30:13 +0100 Subject: [PATCH] fix unused variable exports --- chain/kusama/defaults.go | 12 ++++++------ chain/paseo/defaults.go | 12 ++++++------ chain/polkadot/defaults.go | 12 ++++++------ chain/westend-dev/defaults.go | 12 ++++++------ chain/westend-local/default.go | 24 ++++++++++++------------ chain/westend/defaults.go | 12 ++++++------ config/config.go | 18 +++++++++--------- 7 files changed, 51 insertions(+), 51 deletions(-) diff --git a/chain/kusama/defaults.go b/chain/kusama/defaults.go index d2df60b271..58497399e9 100644 --- a/chain/kusama/defaults.go +++ b/chain/kusama/defaults.go @@ -10,17 +10,17 @@ import ( ) var ( - // DefaultBasePath default node base directory path - DefaultBasePath = xdg.DataHome + "/gossamer/kusama" - // DefaultChainSpec is the default chain-spec json path - DefaultChainSpec = "./chain/kusama/chain-spec-raw.json" + // defaultBasePath default node base directory path + defaultBasePath = xdg.DataHome + "/gossamer/kusama" + // defaultChainSpec is the default chain-spec json path + defaultChainSpec = "./chain/kusama/chain-spec-raw.json" ) // DefaultConfig returns a kusama node configuration func DefaultConfig() *cfg.Config { config := cfg.DefaultConfig() - config.BasePath = DefaultBasePath - config.ChainSpec = DefaultChainSpec + config.BasePath = defaultBasePath + config.ChainSpec = defaultChainSpec config.Core.BabeAuthority = false config.Core.GrandpaAuthority = false config.Core.Role = 1 diff --git a/chain/paseo/defaults.go b/chain/paseo/defaults.go index 942ee11197..8c60c203fd 100644 --- a/chain/paseo/defaults.go +++ b/chain/paseo/defaults.go @@ -9,17 +9,17 @@ import ( ) var ( - // DefaultBasePath default node base directory path - DefaultBasePath = xdg.DataHome + "/gossamer/paseo" - // DefaultChainSpec is the default chain spec configuration path - DefaultChainSpec = "./chain/paseo/chain-spec-raw.json" + // defaultBasePath default node base directory path + defaultBasePath = xdg.DataHome + "/gossamer/paseo" + // defaultChainSpec is the default chain spec configuration path + defaultChainSpec = "./chain/paseo/chain-spec-raw.json" ) // DefaultConfig returns a paseo node configuration func DefaultConfig() *cfg.Config { config := cfg.DefaultConfig() - config.BasePath = DefaultBasePath - config.ChainSpec = DefaultChainSpec + config.BasePath = defaultBasePath + config.ChainSpec = defaultChainSpec config.Core.BabeAuthority = false config.Core.GrandpaAuthority = false config.Core.Role = 1 diff --git a/chain/polkadot/defaults.go b/chain/polkadot/defaults.go index fb2fc66d1b..0f52bf7655 100644 --- a/chain/polkadot/defaults.go +++ b/chain/polkadot/defaults.go @@ -9,17 +9,17 @@ import ( ) var ( - // DefaultBasePath default node base directory path - DefaultBasePath = xdg.DataHome + "/gossamer/polkadot" - // DefaultChainSpec is the default chain spec configuration path - DefaultChainSpec = "./chain/polkadot/chain-spec-raw.json" + // defaultBasePath default node base directory path + defaultBasePath = xdg.DataHome + "/gossamer/polkadot" + // defaultChainSpec is the default chain spec configuration path + defaultChainSpec = "./chain/polkadot/chain-spec-raw.json" ) // DefaultConfig returns a polkadot node configuration func DefaultConfig() *cfg.Config { config := cfg.DefaultConfig() - config.BasePath = DefaultBasePath - config.ChainSpec = DefaultChainSpec + config.BasePath = defaultBasePath + config.ChainSpec = defaultChainSpec config.Core.BabeAuthority = false config.Core.GrandpaAuthority = false config.Core.Role = 1 diff --git a/chain/westend-dev/defaults.go b/chain/westend-dev/defaults.go index e2e925da2e..e171ae3382 100644 --- a/chain/westend-dev/defaults.go +++ b/chain/westend-dev/defaults.go @@ -9,17 +9,17 @@ import ( ) var ( - // DefaultBasePath is the default basepath for the westend dev node - DefaultBasePath = xdg.DataHome + "/gossamer/westend-dev" - // DefaultChainSpec is the default chain spec for the westend dev node - DefaultChainSpec = "./chain/westend-dev/westend-dev-spec-raw.json" + // defaultBasePath is the default basepath for the westend dev node + defaultBasePath = xdg.DataHome + "/gossamer/westend-dev" + // defaultChainSpec is the default chain spec for the westend dev node + defaultChainSpec = "./chain/westend-dev/westend-dev-spec-raw.json" ) // DefaultConfig returns a westend dev node configuration func DefaultConfig() *cfg.Config { config := cfg.DefaultConfig() - config.BasePath = DefaultBasePath - config.ChainSpec = DefaultChainSpec + config.BasePath = defaultBasePath + config.ChainSpec = defaultChainSpec config.RPC.RPCExternal = true config.RPC.UnsafeRPC = true config.RPC.WSExternal = true diff --git a/chain/westend-local/default.go b/chain/westend-local/default.go index cbcad26344..13a5f0c5dc 100644 --- a/chain/westend-local/default.go +++ b/chain/westend-local/default.go @@ -9,21 +9,21 @@ import ( ) var ( - // DefaultChainSpec is the default chain spec for the westend local node - DefaultChainSpec = "./chain/westend-local/westend-local-spec-raw.json" + // defaultChainSpec is the default chain spec for the westend local node + defaultChainSpec = "./chain/westend-local/westend-local-spec-raw.json" - // DefaultBasePathAlice is the default basepath for the westend local alice node - DefaultBasePathAlice = xdg.DataHome + "/gossamer/westend-dev/alice" - // DefaultBasePathBob is the default basepath for the westend local bob node - DefaultBasePathBob = xdg.DataHome + "/gossamer/westend-dev/bob" - // DefaultBasePathCharlie is the default basepath for the westend local charlie node - DefaultBasePathCharlie = xdg.DataHome + "/gossamer/westend-dev/charlie" + // defaultBasePathAlice is the default basepath for the westend local alice node + defaultBasePathAlice = xdg.DataHome + "/gossamer/westend-dev/alice" + // defaultBasePathBob is the default basepath for the westend local bob node + defaultBasePathBob = xdg.DataHome + "/gossamer/westend-dev/bob" + // defaultBasePathCharlie is the default basepath for the westend local charlie node + defaultBasePathCharlie = xdg.DataHome + "/gossamer/westend-dev/charlie" ) // DefaultConfig returns a westend local node configuration func DefaultConfig() *cfg.Config { config := cfg.DefaultConfig() - config.ChainSpec = DefaultChainSpec + config.ChainSpec = defaultChainSpec config.Network.NoMDNS = false config.RPC.RPCExternal = true config.RPC.UnsafeRPC = true @@ -36,7 +36,7 @@ func DefaultConfig() *cfg.Config { // DefaultAliceConfig returns a westend local node configuration func DefaultAliceConfig() *cfg.Config { config := DefaultConfig() - config.BasePath = DefaultBasePathAlice + config.BasePath = defaultBasePathAlice config.PrometheusPort = uint32(9856) config.Network.Port = 7001 config.RPC.Port = 8545 @@ -49,7 +49,7 @@ func DefaultAliceConfig() *cfg.Config { // DefaultBobConfig returns a westend local node configuration with bob as the authority func DefaultBobConfig() *cfg.Config { config := DefaultConfig() - config.BasePath = DefaultBasePathBob + config.BasePath = defaultBasePathBob config.PrometheusPort = uint32(9866) config.Network.Port = 7011 config.RPC.Port = 8555 @@ -62,7 +62,7 @@ func DefaultBobConfig() *cfg.Config { // DefaultCharlieConfig returns a westend local node configuration with charlie as the authority func DefaultCharlieConfig() *cfg.Config { config := DefaultConfig() - config.BasePath = DefaultBasePathCharlie + config.BasePath = defaultBasePathCharlie config.PrometheusPort = uint32(9876) config.Network.Port = 7021 config.RPC.Port = 8565 diff --git a/chain/westend/defaults.go b/chain/westend/defaults.go index 4199276e17..3bf2a64a27 100644 --- a/chain/westend/defaults.go +++ b/chain/westend/defaults.go @@ -9,17 +9,17 @@ import ( ) var ( - // DefaultBasePath default node base directory path - DefaultBasePath = xdg.DataHome + "/gossamer/westend" - // DefaultChainSpec is the default chain specification path - DefaultChainSpec = "./chain/westend/chain-spec-raw.json" + // defaultBasePath default node base directory path + defaultBasePath = xdg.DataHome + "/gossamer/westend" + // defaultChainSpec is the default chain specification path + defaultChainSpec = "./chain/westend/chain-spec-raw.json" ) // DefaultConfig returns a westend node configuration func DefaultConfig() *cfg.Config { config := cfg.DefaultConfig() - config.BasePath = DefaultBasePath - config.ChainSpec = DefaultChainSpec + config.BasePath = defaultBasePath + config.ChainSpec = defaultChainSpec config.Core.BabeAuthority = false config.Core.GrandpaAuthority = false config.Core.Role = 1 diff --git a/config/config.go b/config/config.go index 2aefaea675..56f0b04a07 100644 --- a/config/config.go +++ b/config/config.go @@ -19,10 +19,10 @@ import ( var ( // uint32Max is the maximum value of a uint32 uint32Max = ^uint32(0) - // DefaultChainSpecFile is the default genesis file - DefaultChainSpecFile = "chain-spec-raw.json" - // DefaultBasePath is the default base path - DefaultBasePath = xdg.DataHome + "/gossamer" + // defaultChainSpecFile is the default genesis file + defaultChainSpecFile = "chain-spec-raw.json" + // defaultBasePath is the default base path + defaultBasePath = xdg.DataHome + "/gossamer" // DefaultLogLevel is the default log level DefaultLogLevel = "info" // DefaultPrometheusPort is the default prometheus port @@ -32,8 +32,8 @@ var ( // DefaultPruning is the default pruning strategy DefaultPruning = pruner.Archive - // DefaultAccount is the default account key - DefaultAccount = "alice" + // defaultAccount is the default account key + defaultAccount = "alice" // DefaultRole is the default node role DefaultRole = common.AuthorityRole @@ -356,7 +356,7 @@ func DefaultConfig() *Config { Wasmer: DefaultLogLevel, }, Account: &AccountConfig{ - Key: DefaultAccount, + Key: defaultAccount, Unlock: "", }, Core: &CoreConfig{ @@ -437,7 +437,7 @@ func DefaultConfigFromSpec(nodeSpec *genesis.Genesis) *Config { Wasmer: DefaultLogLevel, }, Account: &AccountConfig{ - Key: DefaultAccount, + Key: defaultAccount, Unlock: "", }, Core: &CoreConfig{ @@ -630,5 +630,5 @@ func (n NetworkRole) String() string { // GetChainSpec returns the path to the chain-spec file. func GetChainSpec(basePath string) string { - return filepath.Join(basePath, DefaultChainSpecFile) + return filepath.Join(basePath, defaultChainSpecFile) }