aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/ethereum/main.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/ethereum/main.go
parenta80be98f31976207667a484f1f7b0eac79794ef9 (diff)
downloaddexon-58d9d98dafc9013a4aa6f7f2c8c8e3d9ad76ce7c.tar
dexon-58d9d98dafc9013a4aa6f7f2c8c8e3d9ad76ce7c.tar.gz
dexon-58d9d98dafc9013a4aa6f7f2c8c8e3d9ad76ce7c.tar.bz2
dexon-58d9d98dafc9013a4aa6f7f2c8c8e3d9ad76ce7c.tar.lz
dexon-58d9d98dafc9013a4aa6f7f2c8c8e3d9ad76ce7c.tar.xz
dexon-58d9d98dafc9013a4aa6f7f2c8c8e3d9ad76ce7c.tar.zst
dexon-58d9d98dafc9013a4aa6f7f2c8c8e3d9ad76ce7c.zip
cmd/utils: GetEthereum -> MakeEthConfig
This allows changing the config before starting Ethereum with it.
Diffstat (limited to 'cmd/ethereum/main.go')
-rw-r--r--cmd/ethereum/main.go18
1 files changed, 10 insertions, 8 deletions
diff --git a/cmd/ethereum/main.go b/cmd/ethereum/main.go
index 8b01457e6..d31053fb1 100644
--- a/cmd/ethereum/main.go
+++ b/cmd/ethereum/main.go
@@ -156,24 +156,26 @@ func main() {
func run(ctx *cli.Context) {
fmt.Printf("Welcome to the FRONTIER\n")
utils.HandleInterrupt()
- eth, err := utils.GetEthereum(ClientIdentifier, Version, ctx)
+ cfg := utils.MakeEthConfig(ClientIdentifier, Version, ctx)
+ ethereum, err := eth.New(cfg)
if err != nil {
utils.Fatalf("%v", err)
}
- startEth(ctx, eth)
+ startEth(ctx, ethereum)
// this blocks the thread
- eth.WaitForShutdown()
+ ethereum.WaitForShutdown()
}
func runjs(ctx *cli.Context) {
- eth, err := utils.GetEthereum(ClientIdentifier, Version, ctx)
+ cfg := utils.MakeEthConfig(ClientIdentifier, Version, ctx)
+ ethereum, err := eth.New(cfg)
if err != nil {
utils.Fatalf("%v", err)
}
- startEth(ctx, eth)
- repl := newJSRE(eth)
+ startEth(ctx, ethereum)
+ repl := newJSRE(ethereum)
if len(ctx.Args()) == 0 {
repl.interactive()
} else {
@@ -181,8 +183,8 @@ func runjs(ctx *cli.Context) {
repl.exec(file)
}
}
- eth.Stop()
- eth.WaitForShutdown()
+ ethereum.Stop()
+ ethereum.WaitForShutdown()
}
func startEth(ctx *cli.Context, eth *eth.Ethereum) {