From 9fce273ce97a8db091a0bf9d0b503a2ea7261f81 Mon Sep 17 00:00:00 2001 From: Maran Date: Wed, 14 May 2014 13:32:49 +0200 Subject: Refactored RPC client to utils so it can be reused --- ethereum/ethereum.go | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'ethereum/ethereum.go') diff --git a/ethereum/ethereum.go b/ethereum/ethereum.go index 207e61c88..448223c37 100644 --- a/ethereum/ethereum.go +++ b/ethereum/ethereum.go @@ -4,8 +4,6 @@ import ( "fmt" "github.com/ethereum/eth-go" "github.com/ethereum/eth-go/ethchain" - "github.com/ethereum/eth-go/ethpub" - "github.com/ethereum/eth-go/ethrpc" "github.com/ethereum/eth-go/ethutil" "github.com/ethereum/go-ethereum/utils" "log" @@ -139,12 +137,7 @@ func main() { go console.Start() } if StartRpc { - ethereum.RpcServer, err = ethrpc.NewJsonRpcServer(ethpub.NewPEthereum(ethereum), RpcPort) - if err != nil { - logger.Infoln("Could not start RPC interface:", err) - } else { - go ethereum.RpcServer.Start() - } + utils.DoRpc(ethereum, RpcPort) } RegisterInterrupts(ethereum) -- cgit v1.2.3 From a1dcc5cd1793dc05e2ff38e8a8024690e09aebf5 Mon Sep 17 00:00:00 2001 From: Maran Date: Wed, 14 May 2014 14:11:45 +0200 Subject: Prevent crash during import of privkeys. @obscuren please check if this was commented out for a reason --- ethereum/ethereum.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'ethereum/ethereum.go') diff --git a/ethereum/ethereum.go b/ethereum/ethereum.go index d22513972..2abf6da42 100644 --- a/ethereum/ethereum.go +++ b/ethereum/ethereum.go @@ -64,10 +64,9 @@ func main() { log.SetOutput(logfile) logSys = log.New(logfile, "", flags) logger.AddLogSystem(logSys) - } - /*else { + } else { logSys = log.New(os.Stdout, "", flags) - }*/ + } ethchain.InitFees() -- cgit v1.2.3