diff options
author | obscuren <geffobscura@gmail.com> | 2014-05-13 17:59:13 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2014-05-13 17:59:13 +0800 |
commit | 67820506cbb34f5fe66b7b08454019fb30a8ec5a (patch) | |
tree | 8f5a2f8165c356fa1fc0d04456c4c024db2227a6 | |
parent | 8c9e6746ce741c5bc2d70f308acc955dace67e01 (diff) | |
parent | b9876df5dc719f583172017cc71af146c6f732a9 (diff) | |
download | dexon-67820506cbb34f5fe66b7b08454019fb30a8ec5a.tar.gz dexon-67820506cbb34f5fe66b7b08454019fb30a8ec5a.tar.zst dexon-67820506cbb34f5fe66b7b08454019fb30a8ec5a.zip |
Merge branch 'develop' of github.com-obscure:ethereum/go-ethereum into develop
-rw-r--r-- | ethereal/config.go | 2 | ||||
-rw-r--r-- | ethereal/ethereum.go | 8 | ||||
-rw-r--r-- | ethereum/config.go | 2 | ||||
-rw-r--r-- | ethereum/ethereum.go | 8 |
4 files changed, 14 insertions, 6 deletions
diff --git a/ethereal/config.go b/ethereal/config.go index af85975f2..94f896c5f 100644 --- a/ethereal/config.go +++ b/ethereal/config.go @@ -25,7 +25,7 @@ func Init() { flag.BoolVar(&StartRpc, "r", false, "start rpc server") flag.BoolVar(&ShowGenesis, "g", false, "prints genesis header and exits") flag.BoolVar(&UseUPnP, "upnp", false, "enable UPnP support") - flag.BoolVar(&UseSeed, "seed", false, "seed peers") + flag.BoolVar(&UseSeed, "seed", true, "seed peers") flag.BoolVar(&GenAddr, "genaddr", false, "create a new priv/pub key") flag.BoolVar(&ExportKey, "export", false, "export private key") flag.StringVar(&OutboundPort, "p", "30303", "listening port") diff --git a/ethereal/ethereum.go b/ethereal/ethereum.go index 1a6ab0044..bacf6d446 100644 --- a/ethereal/ethereum.go +++ b/ethereal/ethereum.go @@ -100,8 +100,12 @@ func main() { } if StartRpc { - ethereum.RpcServer = ethrpc.NewJsonRpcServer(ethpub.NewPEthereum(ethereum.StateManager(), ethereum.BlockChain(), ethereum.TxPool())) - go ethereum.RpcServer.Start() + ethereum.RpcServer, err = ethrpc.NewJsonRpcServer(ethpub.NewPEthereum(ethereum.StateManager(), ethereum.BlockChain(), ethereum.TxPool())) + if err != nil { + log.Println("Could not start RPC interface:", err) + } else { + go ethereum.RpcServer.Start() + } } log.Printf("Starting Ethereum GUI v%s\n", ethutil.Config.Ver) diff --git a/ethereum/config.go b/ethereum/config.go index db1391881..234e79f12 100644 --- a/ethereum/config.go +++ b/ethereum/config.go @@ -28,7 +28,7 @@ func Init() { flag.BoolVar(&StartRpc, "r", false, "start rpc server") flag.BoolVar(&NonInteractive, "y", false, "non-interactive mode (say yes to confirmations)") flag.BoolVar(&UseUPnP, "upnp", false, "enable UPnP support") - flag.BoolVar(&UseSeed, "seed", false, "seed peers") + flag.BoolVar(&UseSeed, "seed", true, "seed peers") flag.BoolVar(&GenAddr, "genaddr", false, "create a new priv/pub key") flag.BoolVar(&ExportKey, "export", false, "export private key") flag.StringVar(&OutboundPort, "p", "30303", "listening port") diff --git a/ethereum/ethereum.go b/ethereum/ethereum.go index 2f05bf2a1..8ef061be0 100644 --- a/ethereum/ethereum.go +++ b/ethereum/ethereum.go @@ -133,8 +133,12 @@ func main() { go console.Start() } if StartRpc { - ethereum.RpcServer = ethrpc.NewJsonRpcServer(ethpub.NewPEthereum(ethereum.StateManager(), ethereum.BlockChain(), ethereum.TxPool())) - go ethereum.RpcServer.Start() + ethereum.RpcServer, err = ethrpc.NewJsonRpcServer(ethpub.NewPEthereum(ethereum.StateManager(), ethereum.BlockChain(), ethereum.TxPool())) + if err != nil { + logger.Infoln("Could not start RPC interface:", err) + } else { + go ethereum.RpcServer.Start() + } } RegisterInterrupts(ethereum) |