diff options
author | Maran <maran.hidskes@gmail.com> | 2014-05-13 18:00:48 +0800 |
---|---|---|
committer | Maran <maran.hidskes@gmail.com> | 2014-05-13 18:00:48 +0800 |
commit | 9a03df7bd831f1b66bc02510a4abed878f4ffa17 (patch) | |
tree | 32776dfbf19e477e063ca7c62ddd8e1a351e70f6 /ethereum | |
parent | b9876df5dc719f583172017cc71af146c6f732a9 (diff) | |
download | go-tangerine-9a03df7bd831f1b66bc02510a4abed878f4ffa17.tar.gz go-tangerine-9a03df7bd831f1b66bc02510a4abed878f4ffa17.tar.zst go-tangerine-9a03df7bd831f1b66bc02510a4abed878f4ffa17.zip |
Implemented a flag for a different RPC port; --rpcport
Diffstat (limited to 'ethereum')
-rw-r--r-- | ethereum/config.go | 2 | ||||
-rw-r--r-- | ethereum/ethereum.go | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/ethereum/config.go b/ethereum/config.go index 234e79f12..7ca1a9801 100644 --- a/ethereum/config.go +++ b/ethereum/config.go @@ -7,6 +7,7 @@ import ( var StartConsole bool var StartMining bool var StartRpc bool +var RpcPort int var UseUPnP bool var OutboundPort string var ShowGenesis bool @@ -26,6 +27,7 @@ func Init() { flag.BoolVar(&ShowGenesis, "g", false, "prints genesis header and exits") //flag.BoolVar(&UseGui, "gui", true, "use the gui") flag.BoolVar(&StartRpc, "r", false, "start rpc server") + flag.IntVar(&RpcPort, "rpcport", 8080, "port to start json-rpc server on") flag.BoolVar(&NonInteractive, "y", false, "non-interactive mode (say yes to confirmations)") flag.BoolVar(&UseUPnP, "upnp", false, "enable UPnP support") flag.BoolVar(&UseSeed, "seed", true, "seed peers") diff --git a/ethereum/ethereum.go b/ethereum/ethereum.go index 8ef061be0..d49b5dc8a 100644 --- a/ethereum/ethereum.go +++ b/ethereum/ethereum.go @@ -133,7 +133,7 @@ func main() { go console.Start() } if StartRpc { - ethereum.RpcServer, err = ethrpc.NewJsonRpcServer(ethpub.NewPEthereum(ethereum.StateManager(), ethereum.BlockChain(), ethereum.TxPool())) + ethereum.RpcServer, err = ethrpc.NewJsonRpcServer(ethpub.NewPEthereum(ethereum.StateManager(), ethereum.BlockChain(), ethereum.TxPool()), RpcPort) if err != nil { logger.Infoln("Could not start RPC interface:", err) } else { |