eth: move eth.Config to a common package (#22205)
This moves the eth config definition into a separate package, eth/ethconfig. Packages eth and les can now import this common package instead of importing eth from les, reducing dependencies. Co-authored-by: Felix Lange <fjl@twurst.com>
This commit is contained in:
@ -27,7 +27,7 @@ import (
|
||||
"gopkg.in/urfave/cli.v1"
|
||||
|
||||
"github.com/ethereum/go-ethereum/cmd/utils"
|
||||
"github.com/ethereum/go-ethereum/eth"
|
||||
"github.com/ethereum/go-ethereum/eth/ethconfig"
|
||||
"github.com/ethereum/go-ethereum/internal/ethapi"
|
||||
"github.com/ethereum/go-ethereum/log"
|
||||
"github.com/ethereum/go-ethereum/metrics"
|
||||
@ -85,7 +85,7 @@ type whisperDeprecatedConfig struct {
|
||||
}
|
||||
|
||||
type gethConfig struct {
|
||||
Eth eth.Config
|
||||
Eth ethconfig.Config
|
||||
Shh whisperDeprecatedConfig
|
||||
Node node.Config
|
||||
Ethstats ethstatsConfig
|
||||
@ -121,7 +121,7 @@ func defaultNodeConfig() node.Config {
|
||||
func makeConfigNode(ctx *cli.Context) (*node.Node, gethConfig) {
|
||||
// Load defaults.
|
||||
cfg := gethConfig{
|
||||
Eth: eth.DefaultConfig,
|
||||
Eth: ethconfig.Defaults,
|
||||
Node: defaultNodeConfig(),
|
||||
Metrics: metrics.DefaultConfig,
|
||||
}
|
||||
|
Reference in New Issue
Block a user