Commit d31303a5 authored by Maran's avatar Maran

Implemented support for a custom RPC port

parent a9d5656a
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
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment