Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
Geth-Modification
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张蕾
Geth-Modification
Commits
9a03df7b
Commit
9a03df7b
authored
May 13, 2014
by
Maran
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implemented a flag for a different RPC port; --rpcport
parent
b9876df5
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
2 deletions
+6
-2
config.go
ethereal/config.go
+2
-0
ethereum.go
ethereal/ethereum.go
+1
-1
config.go
ethereum/config.go
+2
-0
ethereum.go
ethereum/ethereum.go
+1
-1
No files found.
ethereal/config.go
View file @
9a03df7b
...
@@ -7,6 +7,7 @@ import (
...
@@ -7,6 +7,7 @@ import (
var
StartConsole
bool
var
StartConsole
bool
var
StartMining
bool
var
StartMining
bool
var
StartRpc
bool
var
StartRpc
bool
var
RpcPort
int
var
UseUPnP
bool
var
UseUPnP
bool
var
OutboundPort
string
var
OutboundPort
string
var
ShowGenesis
bool
var
ShowGenesis
bool
...
@@ -28,6 +29,7 @@ func Init() {
...
@@ -28,6 +29,7 @@ func Init() {
flag
.
BoolVar
(
&
UseSeed
,
"seed"
,
true
,
"seed peers"
)
flag
.
BoolVar
(
&
UseSeed
,
"seed"
,
true
,
"seed peers"
)
flag
.
BoolVar
(
&
GenAddr
,
"genaddr"
,
false
,
"create a new priv/pub key"
)
flag
.
BoolVar
(
&
GenAddr
,
"genaddr"
,
false
,
"create a new priv/pub key"
)
flag
.
BoolVar
(
&
ExportKey
,
"export"
,
false
,
"export private 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
(
&
OutboundPort
,
"p"
,
"30303"
,
"listening port"
)
flag
.
StringVar
(
&
DataDir
,
"dir"
,
".ethereal"
,
"ethereum data directory"
)
flag
.
StringVar
(
&
DataDir
,
"dir"
,
".ethereal"
,
"ethereum data directory"
)
flag
.
StringVar
(
&
ImportKey
,
"import"
,
""
,
"imports the given private key (hex)"
)
flag
.
StringVar
(
&
ImportKey
,
"import"
,
""
,
"imports the given private key (hex)"
)
...
...
ethereal/ethereum.go
View file @
9a03df7b
...
@@ -100,7 +100,7 @@ func main() {
...
@@ -100,7 +100,7 @@ func main() {
}
}
if
StartRpc
{
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
{
if
err
!=
nil
{
log
.
Println
(
"Could not start RPC interface:"
,
err
)
log
.
Println
(
"Could not start RPC interface:"
,
err
)
}
else
{
}
else
{
...
...
ethereum/config.go
View file @
9a03df7b
...
@@ -7,6 +7,7 @@ import (
...
@@ -7,6 +7,7 @@ import (
var
StartConsole
bool
var
StartConsole
bool
var
StartMining
bool
var
StartMining
bool
var
StartRpc
bool
var
StartRpc
bool
var
RpcPort
int
var
UseUPnP
bool
var
UseUPnP
bool
var
OutboundPort
string
var
OutboundPort
string
var
ShowGenesis
bool
var
ShowGenesis
bool
...
@@ -26,6 +27,7 @@ func Init() {
...
@@ -26,6 +27,7 @@ func Init() {
flag
.
BoolVar
(
&
ShowGenesis
,
"g"
,
false
,
"prints genesis header and exits"
)
flag
.
BoolVar
(
&
ShowGenesis
,
"g"
,
false
,
"prints genesis header and exits"
)
//flag.BoolVar(&UseGui, "gui", true, "use the gui")
//flag.BoolVar(&UseGui, "gui", true, "use the gui")
flag
.
BoolVar
(
&
StartRpc
,
"r"
,
false
,
"start rpc server"
)
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
(
&
NonInteractive
,
"y"
,
false
,
"non-interactive mode (say yes to confirmations)"
)
flag
.
BoolVar
(
&
UseUPnP
,
"upnp"
,
false
,
"enable UPnP support"
)
flag
.
BoolVar
(
&
UseUPnP
,
"upnp"
,
false
,
"enable UPnP support"
)
flag
.
BoolVar
(
&
UseSeed
,
"seed"
,
true
,
"seed peers"
)
flag
.
BoolVar
(
&
UseSeed
,
"seed"
,
true
,
"seed peers"
)
...
...
ethereum/ethereum.go
View file @
9a03df7b
...
@@ -133,7 +133,7 @@ func main() {
...
@@ -133,7 +133,7 @@ func main() {
go
console
.
Start
()
go
console
.
Start
()
}
}
if
StartRpc
{
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
{
if
err
!=
nil
{
logger
.
Infoln
(
"Could not start RPC interface:"
,
err
)
logger
.
Infoln
(
"Could not start RPC interface:"
,
err
)
}
else
{
}
else
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment