aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/utils/flags.go
diff options
context:
space:
mode:
authorFelix Lange <fjl@twurst.com>2015-03-14 01:30:45 +0800
committerFelix Lange <fjl@twurst.com>2015-03-14 01:41:09 +0800
commit58d9d98dafc9013a4aa6f7f2c8c8e3d9ad76ce7c (patch)
tree6b2127d8490b42baaf1ad6ca5d06114014768bf3 /cmd/utils/flags.go
parenta80be98f31976207667a484f1f7b0eac79794ef9 (diff)
downloadgo-tangerine-58d9d98dafc9013a4aa6f7f2c8c8e3d9ad76ce7c.tar
go-tangerine-58d9d98dafc9013a4aa6f7f2c8c8e3d9ad76ce7c.tar.gz
go-tangerine-58d9d98dafc9013a4aa6f7f2c8c8e3d9ad76ce7c.tar.bz2
go-tangerine-58d9d98dafc9013a4aa6f7f2c8c8e3d9ad76ce7c.tar.lz
go-tangerine-58d9d98dafc9013a4aa6f7f2c8c8e3d9ad76ce7c.tar.xz
go-tangerine-58d9d98dafc9013a4aa6f7f2c8c8e3d9ad76ce7c.tar.zst
go-tangerine-58d9d98dafc9013a4aa6f7f2c8c8e3d9ad76ce7c.zip
cmd/utils: GetEthereum -> MakeEthConfig
This allows changing the config before starting Ethereum with it.
Diffstat (limited to 'cmd/utils/flags.go')
-rw-r--r--cmd/utils/flags.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/cmd/utils/flags.go b/cmd/utils/flags.go
index 5c188a41e..2db071148 100644
--- a/cmd/utils/flags.go
+++ b/cmd/utils/flags.go
@@ -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(&eth.Config{
+func MakeEthConfig(clientID, version string, ctx *cli.Context) *eth.Config {
+ return &eth.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) {