aboutsummaryrefslogtreecommitdiffstats
path: root/rpc
diff options
context:
space:
mode:
authorTaylor Gerring <taylor.gerring@gmail.com>2015-03-02 21:06:08 +0800
committerTaylor Gerring <taylor.gerring@gmail.com>2015-03-02 21:06:08 +0800
commit4cb0bfe9395f3a45fcea00bc753cbd2c20ca78e8 (patch)
tree1cc4369855586a5b59406d09299e89f8e3f9142d /rpc
parentcfe037028081ebb84ee35caa5b16fed5d125b58a (diff)
parent65cad14f9b27db396d036f47814d4843d947ac43 (diff)
downloaddexon-4cb0bfe9395f3a45fcea00bc753cbd2c20ca78e8.tar.gz
dexon-4cb0bfe9395f3a45fcea00bc753cbd2c20ca78e8.tar.zst
dexon-4cb0bfe9395f3a45fcea00bc753cbd2c20ca78e8.zip
Merge branch 'develop' of github.com:ethereum/go-ethereum into removews
Conflicts: cmd/ethereum/flags.go cmd/mist/flags.go
Diffstat (limited to 'rpc')
-rw-r--r--rpc/http/server.go8
1 files changed, 5 insertions, 3 deletions
diff --git a/rpc/http/server.go b/rpc/http/server.go
index fa66eed48..452b7c9af 100644
--- a/rpc/http/server.go
+++ b/rpc/http/server.go
@@ -29,8 +29,8 @@ import (
var rpchttplogger = logger.NewLogger("RPC-HTTP")
var JSON rpc.JsonWrapper
-func NewRpcHttpServer(pipe *xeth.XEth, port int) (*RpcHttpServer, error) {
- sport := fmt.Sprintf("127.0.0.1:%d", port)
+func NewRpcHttpServer(pipe *xeth.XEth, address string, port int) (*RpcHttpServer, error) {
+ sport := fmt.Sprintf("%s:%d", address, port)
l, err := net.Listen("tcp", sport)
if err != nil {
return nil, err
@@ -41,6 +41,7 @@ func NewRpcHttpServer(pipe *xeth.XEth, port int) (*RpcHttpServer, error) {
quit: make(chan bool),
pipe: pipe,
port: port,
+ addr: address,
}, nil
}
@@ -49,6 +50,7 @@ type RpcHttpServer struct {
listener net.Listener
pipe *xeth.XEth
port int
+ addr string
}
func (s *RpcHttpServer) exitHandler() {
@@ -69,7 +71,7 @@ func (s *RpcHttpServer) Stop() {
}
func (s *RpcHttpServer) Start() {
- rpchttplogger.Infof("Starting RPC-HTTP server on port %d", s.port)
+ rpchttplogger.Infof("Starting RPC-HTTP server on %s:%d", s.addr, s.port)
go s.exitHandler()
api := rpc.NewEthereumApi(s.pipe)