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
c49a4165
Commit
c49a4165
authored
5 years ago
by
Guillaume Ballet
Committed by
Felix Lange
5 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
consensus/ethash: fix a typo and error message (#20503)
parent
a1bc0e3c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
consensus.go
consensus/ethash/consensus.go
+3
-3
No files found.
consensus/ethash/consensus.go
View file @
c49a4165
...
...
@@ -68,7 +68,7 @@ var (
// codebase, inherently breaking if the engine is swapped out. Please put common
// error types into the consensus package.
var
(
err
ZeroBlockTime
=
errors
.
New
(
"timestamp equals parent's
"
)
err
OlderBlockTime
=
errors
.
New
(
"timestamp older than parent
"
)
errTooManyUncles
=
errors
.
New
(
"too many uncles"
)
errDuplicateUncle
=
errors
.
New
(
"duplicate uncle"
)
errUncleIsAncestor
=
errors
.
New
(
"uncle is ancestor"
)
...
...
@@ -255,9 +255,9 @@ func (ethash *Ethash) verifyHeader(chain consensus.ChainReader, header, parent *
}
}
if
header
.
Time
<=
parent
.
Time
{
return
err
Zero
BlockTime
return
err
Older
BlockTime
}
// Verify the block's difficulty based
i
n its timestamp and parent's difficulty
// Verify the block's difficulty based
o
n its timestamp and parent's difficulty
expected
:=
ethash
.
CalcDifficulty
(
chain
,
header
.
Time
,
parent
)
if
expected
.
Cmp
(
header
.
Difficulty
)
!=
0
{
...
...
This diff is collapsed.
Click to expand it.
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