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
72617a07
Commit
72617a07
authored
Oct 28, 2019
by
Guillaume Ballet
Committed by
Péter Szilágyi
Oct 28, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
consensus: fix possessives in comments. (#20209)
parent
db79143a
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
5 deletions
+5
-5
clique.go
consensus/clique/clique.go
+2
-2
errors.go
consensus/errors.go
+1
-1
consensus.go
consensus/ethash/consensus.go
+2
-2
No files found.
consensus/clique/clique.go
View file @
72617a07
...
...
@@ -311,7 +311,7 @@ func (c *Clique) verifyCascadingFields(chain consensus.ChainReader, header *type
if
number
==
0
{
return
nil
}
// Ensure that the block's timestamp isn't too close to it
'
s parent
// Ensure that the block's timestamp isn't too close to its parent
var
parent
*
types
.
Header
if
len
(
parents
)
>
0
{
parent
=
parents
[
len
(
parents
)
-
1
]
...
...
@@ -522,7 +522,7 @@ func (c *Clique) Prepare(chain consensus.ChainReader, header *types.Header) erro
// Set the correct difficulty
header
.
Difficulty
=
CalcDifficulty
(
snap
,
c
.
signer
)
// Ensure the extra data has all it
'
s components
// Ensure the extra data has all its components
if
len
(
header
.
Extra
)
<
extraVanity
{
header
.
Extra
=
append
(
header
.
Extra
,
bytes
.
Repeat
([]
byte
{
0x00
},
extraVanity
-
len
(
header
.
Extra
))
...
)
}
...
...
consensus/errors.go
View file @
72617a07
...
...
@@ -31,7 +31,7 @@ var (
// to the current node.
ErrFutureBlock
=
errors
.
New
(
"block in the future"
)
// ErrInvalidNumber is returned if a block's number doesn't equal it
'
s parent's
// ErrInvalidNumber is returned if a block's number doesn't equal its parent's
// plus one.
ErrInvalidNumber
=
errors
.
New
(
"invalid block number"
)
)
consensus/ethash/consensus.go
View file @
72617a07
...
...
@@ -86,7 +86,7 @@ func (ethash *Ethash) VerifyHeader(chain consensus.ChainReader, header *types.He
if
ethash
.
config
.
PowMode
==
ModeFullFake
{
return
nil
}
// Short circuit if the header is known, or it
'
s parent not
// Short circuit if the header is known, or its parent not
number
:=
header
.
Number
.
Uint64
()
if
chain
.
GetHeader
(
header
.
Hash
(),
number
)
!=
nil
{
return
nil
...
...
@@ -252,7 +252,7 @@ func (ethash *Ethash) verifyHeader(chain consensus.ChainReader, header, parent *
if
header
.
Time
<=
parent
.
Time
{
return
errZeroBlockTime
}
// Verify the block's difficulty based in it
'
s timestamp and parent's difficulty
// Verify the block's difficulty based in its timestamp and parent's difficulty
expected
:=
ethash
.
CalcDifficulty
(
chain
,
header
.
Time
,
parent
)
if
expected
.
Cmp
(
header
.
Difficulty
)
!=
0
{
...
...
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