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 /ethereal | |
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 'ethereal')
-rw-r--r-- | ethereal/config.go | 2 | ||||
-rw-r--r-- | ethereal/ethereum.go | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/ethereal/config.go b/ethereal/config.go index 94f896c5f..e4bdb0a00 100644 --- a/ethereal/config.go +++ b/ethereal/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 @@ -28,6 +29,7 @@ func Init() { flag.BoolVar(&UseSeed, "seed", true, "seed peers") flag.BoolVar(&GenAddr, "genaddr", false, "create a new priv/pub key") flag.BoolVar(&ExportKey, "export", false, "export private key") + flag.IntVar(&RpcPort, "rpcport", 8080, "port to start json-rpc server on") flag.StringVar(&OutboundPort, "p", "30303", "listening port") flag.StringVar(&DataDir, "dir", ".ethereal", "ethereum data directory") flag.StringVar(&ImportKey, "import", "", "imports the given private key (hex)") diff --git a/ethereal/ethereum.go b/ethereal/ethereum.go index bacf6d446..ffc5aaab5 100644 --- a/ethereal/ethereum.go +++ b/ethereal/ethereum.go @@ -100,7 +100,7 @@ func main() { } 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 { log.Println("Could not start RPC interface:", err) } else { |