aboutsummaryrefslogtreecommitdiffstats
path: root/ethrpc
diff options
context:
space:
mode:
authorMaran <maran.hidskes@gmail.com>2014-05-13 17:49:55 +0800
committerMaran <maran.hidskes@gmail.com>2014-05-13 17:49:55 +0800
commita9d5656a466f2d57bcf97efdc4644ca20ae8bd6b (patch)
tree0d47f5d3d961a2af8bb14f17594036669b15db58 /ethrpc
parent3647cc5b073b9c82d50394074c978628a32719e4 (diff)
downloadgo-tangerine-a9d5656a466f2d57bcf97efdc4644ca20ae8bd6b.tar.gz
go-tangerine-a9d5656a466f2d57bcf97efdc4644ca20ae8bd6b.tar.zst
go-tangerine-a9d5656a466f2d57bcf97efdc4644ca20ae8bd6b.zip
Added support to NewJsonRpc to return an error as well as an interface
Also changed default port to 8080. Fixes #18
Diffstat (limited to 'ethrpc')
-rw-r--r--ethrpc/server.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/ethrpc/server.go b/ethrpc/server.go
index 40787fade..a612f1163 100644
--- a/ethrpc/server.go
+++ b/ethrpc/server.go
@@ -48,15 +48,15 @@ func (s *JsonRpcServer) Start() {
}
}
-func NewJsonRpcServer(ethp *ethpub.PEthereum) *JsonRpcServer {
- l, err := net.Listen("tcp", ":30304")
+func NewJsonRpcServer(ethp *ethpub.PEthereum) (*JsonRpcServer, error) {
+ l, err := net.Listen("tcp", ":8080")
if err != nil {
- ethutil.Config.Log.Infoln("Error starting JSON-RPC")
+ return nil, err
}
return &JsonRpcServer{
listener: l,
quit: make(chan bool),
ethp: ethp,
- }
+ }, nil
}