cmd/utils: GetEthereum -> MakeEthConfig
This allows changing the config before starting Ethereum with it.
This commit is contained in:
@ -192,8 +192,8 @@ func GetNodeKey(ctx *cli.Context) (key *ecdsa.PrivateKey) {
|
||||
return key
|
||||
}
|
||||
|
||||
func GetEthereum(clientID, version string, ctx *cli.Context) (*eth.Ethereum, error) {
|
||||
return eth.New(ð.Config{
|
||||
func MakeEthConfig(clientID, version string, ctx *cli.Context) *eth.Config {
|
||||
return ð.Config{
|
||||
Name: p2p.MakeName(clientID, version),
|
||||
DataDir: ctx.GlobalString(DataDirFlag.Name),
|
||||
LogFile: ctx.GlobalString(LogFileFlag.Name),
|
||||
@ -209,7 +209,7 @@ func GetEthereum(clientID, version string, ctx *cli.Context) (*eth.Ethereum, err
|
||||
Shh: true,
|
||||
Dial: true,
|
||||
BootNodes: ctx.GlobalString(BootnodesFlag.Name),
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func GetChain(ctx *cli.Context) (*core.ChainManager, ethutil.Database, ethutil.Database) {
|
||||
|
Reference in New Issue
Block a user