good morning!!!!
Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
B
bor
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Harbor Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
open
bor
Commits
72617a07
Commit
72617a07
authored
Oct 28, 2019
by
Guillaume Ballet
Committed by
Péter Szilágyi
Oct 28, 2019
Browse files
Options
Downloads
Patches
Plain Diff
consensus: fix possessives in comments. (#20209)
parent
db79143a
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
consensus/clique/clique.go
+2
-2
2 additions, 2 deletions
consensus/clique/clique.go
consensus/errors.go
+1
-1
1 addition, 1 deletion
consensus/errors.go
consensus/ethash/consensus.go
+2
-2
2 additions, 2 deletions
consensus/ethash/consensus.go
with
5 additions
and
5 deletions
consensus/clique/clique.go
+
2
−
2
View file @
72617a07
...
@@ -311,7 +311,7 @@ func (c *Clique) verifyCascadingFields(chain consensus.ChainReader, header *type
...
@@ -311,7 +311,7 @@ func (c *Clique) verifyCascadingFields(chain consensus.ChainReader, header *type
if
number
==
0
{
if
number
==
0
{
return
nil
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
var
parent
*
types
.
Header
if
len
(
parents
)
>
0
{
if
len
(
parents
)
>
0
{
parent
=
parents
[
len
(
parents
)
-
1
]
parent
=
parents
[
len
(
parents
)
-
1
]
...
@@ -522,7 +522,7 @@ func (c *Clique) Prepare(chain consensus.ChainReader, header *types.Header) erro
...
@@ -522,7 +522,7 @@ func (c *Clique) Prepare(chain consensus.ChainReader, header *types.Header) erro
// Set the correct difficulty
// Set the correct difficulty
header
.
Difficulty
=
CalcDifficulty
(
snap
,
c
.
signer
)
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
{
if
len
(
header
.
Extra
)
<
extraVanity
{
header
.
Extra
=
append
(
header
.
Extra
,
bytes
.
Repeat
([]
byte
{
0x00
},
extraVanity
-
len
(
header
.
Extra
))
...
)
header
.
Extra
=
append
(
header
.
Extra
,
bytes
.
Repeat
([]
byte
{
0x00
},
extraVanity
-
len
(
header
.
Extra
))
...
)
}
}
...
...
This diff is collapsed.
Click to expand it.
consensus/errors.go
+
1
−
1
View file @
72617a07
...
@@ -31,7 +31,7 @@ var (
...
@@ -31,7 +31,7 @@ var (
// to the current node.
// to the current node.
ErrFutureBlock
=
errors
.
New
(
"block in the future"
)
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.
// plus one.
ErrInvalidNumber
=
errors
.
New
(
"invalid block number"
)
ErrInvalidNumber
=
errors
.
New
(
"invalid block number"
)
)
)
This diff is collapsed.
Click to expand it.
consensus/ethash/consensus.go
+
2
−
2
View file @
72617a07
...
@@ -86,7 +86,7 @@ func (ethash *Ethash) VerifyHeader(chain consensus.ChainReader, header *types.He
...
@@ -86,7 +86,7 @@ func (ethash *Ethash) VerifyHeader(chain consensus.ChainReader, header *types.He
if
ethash
.
config
.
PowMode
==
ModeFullFake
{
if
ethash
.
config
.
PowMode
==
ModeFullFake
{
return
nil
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
()
number
:=
header
.
Number
.
Uint64
()
if
chain
.
GetHeader
(
header
.
Hash
(),
number
)
!=
nil
{
if
chain
.
GetHeader
(
header
.
Hash
(),
number
)
!=
nil
{
return
nil
return
nil
...
@@ -252,7 +252,7 @@ func (ethash *Ethash) verifyHeader(chain consensus.ChainReader, header, parent *
...
@@ -252,7 +252,7 @@ func (ethash *Ethash) verifyHeader(chain consensus.ChainReader, header, parent *
if
header
.
Time
<=
parent
.
Time
{
if
header
.
Time
<=
parent
.
Time
{
return
errZeroBlockTime
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
)
expected
:=
ethash
.
CalcDifficulty
(
chain
,
header
.
Time
,
parent
)
if
expected
.
Cmp
(
header
.
Difficulty
)
!=
0
{
if
expected
.
Cmp
(
header
.
Difficulty
)
!=
0
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment