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
9762ddf8
Unverified
Commit
9762ddf8
authored
Aug 19, 2022
by
Justin Traglia
Committed by
GitHub
Aug 19, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cmd/geth: parse uint64 value with ParseUint instead of Atoi (#25545)
Parse uint64 value with ParseUint instead of Atoi
parent
656dc8cc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
chaincmd.go
cmd/geth/chaincmd.go
+3
-3
No files found.
cmd/geth/chaincmd.go
View file @
9762ddf8
...
...
@@ -384,12 +384,12 @@ func parseDumpConfig(ctx *cli.Context, stack *node.Node) (*state.DumpConfig, eth
return
nil
,
nil
,
common
.
Hash
{},
fmt
.
Errorf
(
"block %x not found"
,
hash
)
}
}
else
{
number
,
err
:=
strconv
.
Atoi
(
arg
)
number
,
err
:=
strconv
.
ParseUint
(
arg
,
10
,
64
)
if
err
!=
nil
{
return
nil
,
nil
,
common
.
Hash
{},
err
}
if
hash
:=
rawdb
.
ReadCanonicalHash
(
db
,
uint64
(
number
)
);
hash
!=
(
common
.
Hash
{})
{
header
=
rawdb
.
ReadHeader
(
db
,
hash
,
uint64
(
number
)
)
if
hash
:=
rawdb
.
ReadCanonicalHash
(
db
,
number
);
hash
!=
(
common
.
Hash
{})
{
header
=
rawdb
.
ReadHeader
(
db
,
hash
,
number
)
}
else
{
return
nil
,
nil
,
common
.
Hash
{},
fmt
.
Errorf
(
"header for block %d not found"
,
number
)
}
...
...
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