Skip to content

Commit

Permalink
fix unused variable exports
Browse files Browse the repository at this point in the history
  • Loading branch information
q9f committed Jan 17, 2024
1 parent d413f21 commit c585676
Show file tree
Hide file tree
Showing 7 changed files with 51 additions and 51 deletions.
12 changes: 6 additions & 6 deletions chain/kusama/defaults.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 6 additions & 6 deletions chain/paseo/defaults.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 6 additions & 6 deletions chain/polkadot/defaults.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 6 additions & 6 deletions chain/westend-dev/defaults.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
24 changes: 12 additions & 12 deletions chain/westend-local/default.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
12 changes: 6 additions & 6 deletions chain/westend/defaults.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
18 changes: 9 additions & 9 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Check failure on line 25 in config/config.go

View workflow job for this annotation

GitHub Actions / linting

var `defaultBasePath` is unused (unused)
// DefaultLogLevel is the default log level
DefaultLogLevel = "info"
// DefaultPrometheusPort is the default prometheus port
Expand All @@ -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
Expand Down Expand Up @@ -356,7 +356,7 @@ func DefaultConfig() *Config {
Wasmer: DefaultLogLevel,
},
Account: &AccountConfig{
Key: DefaultAccount,
Key: defaultAccount,
Unlock: "",
},
Core: &CoreConfig{
Expand Down Expand Up @@ -437,7 +437,7 @@ func DefaultConfigFromSpec(nodeSpec *genesis.Genesis) *Config {
Wasmer: DefaultLogLevel,
},
Account: &AccountConfig{
Key: DefaultAccount,
Key: defaultAccount,
Unlock: "",
},
Core: &CoreConfig{
Expand Down Expand Up @@ -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)
}

0 comments on commit c585676

Please sign in to comment.