good morning!!!!

Skip to content
Snippets Groups Projects
Commit b9876df5 authored by Maran Hidskes's avatar Maran Hidskes
Browse files

Added support to NewJsonRpc to return an error as well as an interface

parent a5963d13
No related branches found
No related tags found
No related merge requests found
...@@ -100,9 +100,13 @@ func main() { ...@@ -100,9 +100,13 @@ func main() {
} }
if StartRpc { if StartRpc {
ethereum.RpcServer = ethrpc.NewJsonRpcServer(ethpub.NewPEthereum(ethereum.StateManager(), ethereum.BlockChain(), ethereum.TxPool())) 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() go ethereum.RpcServer.Start()
} }
}
log.Printf("Starting Ethereum GUI v%s\n", ethutil.Config.Ver) log.Printf("Starting Ethereum GUI v%s\n", ethutil.Config.Ver)
......
...@@ -133,9 +133,13 @@ func main() { ...@@ -133,9 +133,13 @@ func main() {
go console.Start() go console.Start()
} }
if StartRpc { if StartRpc {
ethereum.RpcServer = ethrpc.NewJsonRpcServer(ethpub.NewPEthereum(ethereum.StateManager(), ethereum.BlockChain(), ethereum.TxPool())) 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() go ethereum.RpcServer.Start()
} }
}
RegisterInterrupts(ethereum) RegisterInterrupts(ethereum)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment