aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMaran <maran.hidskes@gmail.com>2014-05-13 18:01:34 +0800
committerMaran <maran.hidskes@gmail.com>2014-05-13 18:01:34 +0800
commitd31303a592bcf8662fbbe66e542535e0e82c5a83 (patch)
tree87e715b4aea81ab53757c41d474edb1dbb64bdbf
parenta9d5656a466f2d57bcf97efdc4644ca20ae8bd6b (diff)
downloadgo-tangerine-d31303a592bcf8662fbbe66e542535e0e82c5a83.tar.gz
go-tangerine-d31303a592bcf8662fbbe66e542535e0e82c5a83.tar.zst
go-tangerine-d31303a592bcf8662fbbe66e542535e0e82c5a83.zip
Implemented support for a custom RPC port
-rw-r--r--ethrpc/server.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/ethrpc/server.go b/ethrpc/server.go
index a612f1163..3960e641c 100644
--- a/ethrpc/server.go
+++ b/ethrpc/server.go
@@ -1,6 +1,7 @@
package ethrpc
import (
+ "fmt"
"github.com/ethereum/eth-go/ethpub"
"github.com/ethereum/eth-go/ethutil"
"net"
@@ -48,8 +49,9 @@ func (s *JsonRpcServer) Start() {
}
}
-func NewJsonRpcServer(ethp *ethpub.PEthereum) (*JsonRpcServer, error) {
- l, err := net.Listen("tcp", ":8080")
+func NewJsonRpcServer(ethp *ethpub.PEthereum, port int) (*JsonRpcServer, error) {
+ sport := fmt.Sprintf(":%d", port)
+ l, err := net.Listen("tcp", sport)
if err != nil {
return nil, err
}