aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/utils/cmd.go
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2015-11-18 00:33:25 +0800
committerPéter Szilágyi <peterke@gmail.com>2015-11-27 17:06:12 +0800
commit1e806c4c775bd98b224eb0249007502d348e737b (patch)
treea34bfcac320df6f65e73eb1578b212289be86b5f /cmd/utils/cmd.go
parent8a44451edfa36ea40da564a2fa7ea905d45440a4 (diff)
downloaddexon-1e806c4c775bd98b224eb0249007502d348e737b.tar.gz
dexon-1e806c4c775bd98b224eb0249007502d348e737b.tar.zst
dexon-1e806c4c775bd98b224eb0249007502d348e737b.zip
cmd, common, core, eth, node, rpc, tests, whisper, xeth: use protocol stacks
Diffstat (limited to 'cmd/utils/cmd.go')
-rw-r--r--cmd/utils/cmd.go11
1 files changed, 5 insertions, 6 deletions
diff --git a/cmd/utils/cmd.go b/cmd/utils/cmd.go
index 5cbb58124..a0d60a583 100644
--- a/cmd/utils/cmd.go
+++ b/cmd/utils/cmd.go
@@ -29,9 +29,9 @@ import (
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core"
"github.com/ethereum/go-ethereum/core/types"
- "github.com/ethereum/go-ethereum/eth"
"github.com/ethereum/go-ethereum/logger"
"github.com/ethereum/go-ethereum/logger/glog"
+ "github.com/ethereum/go-ethereum/node"
"github.com/ethereum/go-ethereum/rlp"
"github.com/peterh/liner"
)
@@ -110,10 +110,9 @@ func Fatalf(format string, args ...interface{}) {
os.Exit(1)
}
-func StartEthereum(ethereum *eth.Ethereum) {
- glog.V(logger.Info).Infoln("Starting", ethereum.Name())
- if err := ethereum.Start(); err != nil {
- Fatalf("Error starting Ethereum: %v", err)
+func StartNode(stack *node.Node) {
+ if err := stack.Start(); err != nil {
+ Fatalf("Error starting protocol stack: %v", err)
}
go func() {
sigc := make(chan os.Signal, 1)
@@ -121,7 +120,7 @@ func StartEthereum(ethereum *eth.Ethereum) {
defer signal.Stop(sigc)
<-sigc
glog.V(logger.Info).Infoln("Got interrupt, shutting down...")
- go ethereum.Stop()
+ go stack.Stop()
logger.Flush()
for i := 10; i > 0; i-- {
<-sigc