diff options
author | Maran <maran.hidskes@gmail.com> | 2014-05-13 17:49:55 +0800 |
---|---|---|
committer | Maran <maran.hidskes@gmail.com> | 2014-05-13 17:49:55 +0800 |
commit | a9d5656a466f2d57bcf97efdc4644ca20ae8bd6b (patch) | |
tree | 0d47f5d3d961a2af8bb14f17594036669b15db58 /ethrpc | |
parent | 3647cc5b073b9c82d50394074c978628a32719e4 (diff) | |
download | dexon-a9d5656a466f2d57bcf97efdc4644ca20ae8bd6b.tar dexon-a9d5656a466f2d57bcf97efdc4644ca20ae8bd6b.tar.gz dexon-a9d5656a466f2d57bcf97efdc4644ca20ae8bd6b.tar.bz2 dexon-a9d5656a466f2d57bcf97efdc4644ca20ae8bd6b.tar.lz dexon-a9d5656a466f2d57bcf97efdc4644ca20ae8bd6b.tar.xz dexon-a9d5656a466f2d57bcf97efdc4644ca20ae8bd6b.tar.zst dexon-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.go | 8 |
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 } |