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
b2c59e29
Unverified
Commit
b2c59e29
authored
May 27, 2020
by
sixdays
Committed by
GitHub
May 27, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
consensus/clique: make internal error private (#21132)
Co-authored-by:
linjing
<
linjingjing@baidu.com
>
parent
9219e0fb
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
clique.go
consensus/clique/clique.go
+3
-3
No files found.
consensus/clique/clique.go
View file @
b2c59e29
...
@@ -121,9 +121,9 @@ var (
...
@@ -121,9 +121,9 @@ var (
// turn of the signer.
// turn of the signer.
errWrongDifficulty
=
errors
.
New
(
"wrong difficulty"
)
errWrongDifficulty
=
errors
.
New
(
"wrong difficulty"
)
//
E
rrInvalidTimestamp is returned if the timestamp of a block is lower than
//
e
rrInvalidTimestamp is returned if the timestamp of a block is lower than
// the previous block's timestamp + the minimum block period.
// the previous block's timestamp + the minimum block period.
E
rrInvalidTimestamp
=
errors
.
New
(
"invalid timestamp"
)
e
rrInvalidTimestamp
=
errors
.
New
(
"invalid timestamp"
)
// errInvalidVotingChain is returned if an authorization list is attempted to
// errInvalidVotingChain is returned if an authorization list is attempted to
// be modified via out-of-range or non-contiguous headers.
// be modified via out-of-range or non-contiguous headers.
...
@@ -322,7 +322,7 @@ func (c *Clique) verifyCascadingFields(chain consensus.ChainReader, header *type
...
@@ -322,7 +322,7 @@ func (c *Clique) verifyCascadingFields(chain consensus.ChainReader, header *type
return
consensus
.
ErrUnknownAncestor
return
consensus
.
ErrUnknownAncestor
}
}
if
parent
.
Time
+
c
.
config
.
Period
>
header
.
Time
{
if
parent
.
Time
+
c
.
config
.
Period
>
header
.
Time
{
return
E
rrInvalidTimestamp
return
e
rrInvalidTimestamp
}
}
// Retrieve the snapshot needed to verify this header and cache it
// Retrieve the snapshot needed to verify this header and cache it
snap
,
err
:=
c
.
snapshot
(
chain
,
number
-
1
,
header
.
ParentHash
,
parents
)
snap
,
err
:=
c
.
snapshot
(
chain
,
number
-
1
,
header
.
ParentHash
,
parents
)
...
...
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