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
1af9e4f3
Unverified
Commit
1af9e4f3
authored
Jul 29, 2022
by
Delweng
Committed by
GitHub
Jul 29, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cm/puppeth: fix crash when of ethstats specifier doesn't contain `:` (#25405)
Signed-off-by:
Delweng
<
delweng@gmail.com
>
parent
02905994
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
3 deletions
+12
-3
module.go
cmd/puppeth/module.go
+9
-0
module_explorer.go
cmd/puppeth/module_explorer.go
+1
-1
module_faucet.go
cmd/puppeth/module_faucet.go
+1
-1
module_node.go
cmd/puppeth/module_node.go
+1
-1
No files found.
cmd/puppeth/module.go
View file @
1af9e4f3
...
@@ -150,3 +150,12 @@ func checkPort(host string, port int) error {
...
@@ -150,3 +150,12 @@ func checkPort(host string, port int) error {
conn
.
Close
()
conn
.
Close
()
return
nil
return
nil
}
}
// getEthName gets the Ethereum Name from ethstats
func
getEthName
(
s
string
)
string
{
n
:=
strings
.
Index
(
s
,
":"
)
if
n
>=
0
{
return
s
[
:
n
]
}
return
s
}
cmd/puppeth/module_explorer.go
View file @
1af9e4f3
...
@@ -104,7 +104,7 @@ func deployExplorer(client *sshClient, network string, bootnodes []string, confi
...
@@ -104,7 +104,7 @@ func deployExplorer(client *sshClient, network string, bootnodes []string, confi
"Datadir"
:
config
.
node
.
datadir
,
"Datadir"
:
config
.
node
.
datadir
,
"DBDir"
:
config
.
dbdir
,
"DBDir"
:
config
.
dbdir
,
"EthPort"
:
config
.
node
.
port
,
"EthPort"
:
config
.
node
.
port
,
"EthName"
:
config
.
node
.
ethstats
[
:
strings
.
Index
(
config
.
node
.
ethstats
,
":"
)]
,
"EthName"
:
getEthName
(
config
.
node
.
ethstats
)
,
"WebPort"
:
config
.
port
,
"WebPort"
:
config
.
port
,
"Transformer"
:
transformer
,
"Transformer"
:
transformer
,
})
})
...
...
cmd/puppeth/module_faucet.go
View file @
1af9e4f3
...
@@ -116,7 +116,7 @@ func deployFaucet(client *sshClient, network string, bootnodes []string, config
...
@@ -116,7 +116,7 @@ func deployFaucet(client *sshClient, network string, bootnodes []string, config
"VHost"
:
config
.
host
,
"VHost"
:
config
.
host
,
"ApiPort"
:
config
.
port
,
"ApiPort"
:
config
.
port
,
"EthPort"
:
config
.
node
.
port
,
"EthPort"
:
config
.
node
.
port
,
"EthName"
:
config
.
node
.
ethstats
[
:
strings
.
Index
(
config
.
node
.
ethstats
,
":"
)]
,
"EthName"
:
getEthName
(
config
.
node
.
ethstats
)
,
"CaptchaToken"
:
config
.
captchaToken
,
"CaptchaToken"
:
config
.
captchaToken
,
"CaptchaSecret"
:
config
.
captchaSecret
,
"CaptchaSecret"
:
config
.
captchaSecret
,
"FaucetAmount"
:
config
.
amount
,
"FaucetAmount"
:
config
.
amount
,
...
...
cmd/puppeth/module_node.go
View file @
1af9e4f3
...
@@ -123,7 +123,7 @@ func deployNode(client *sshClient, network string, bootnodes []string, config *n
...
@@ -123,7 +123,7 @@ func deployNode(client *sshClient, network string, bootnodes []string, config *n
"TotalPeers"
:
config
.
peersTotal
,
"TotalPeers"
:
config
.
peersTotal
,
"Light"
:
config
.
peersLight
>
0
,
"Light"
:
config
.
peersLight
>
0
,
"LightPeers"
:
config
.
peersLight
,
"LightPeers"
:
config
.
peersLight
,
"Ethstats"
:
config
.
ethstats
[
:
strings
.
Index
(
config
.
ethstats
,
":"
)]
,
"Ethstats"
:
getEthName
(
config
.
ethstats
)
,
"Etherbase"
:
config
.
etherbase
,
"Etherbase"
:
config
.
etherbase
,
"GasTarget"
:
config
.
gasTarget
,
"GasTarget"
:
config
.
gasTarget
,
"GasLimit"
:
config
.
gasLimit
,
"GasLimit"
:
config
.
gasLimit
,
...
...
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