Unverified Commit b2c59e29 authored by sixdays's avatar sixdays Committed by GitHub

consensus/clique: make internal error private (#21132)

Co-authored-by: 's avatarlinjing <linjingjing@baidu.com>
parent 9219e0fb
...@@ -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")
// ErrInvalidTimestamp is returned if the timestamp of a block is lower than // errInvalidTimestamp 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.
ErrInvalidTimestamp = errors.New("invalid timestamp") errInvalidTimestamp = 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 ErrInvalidTimestamp return errInvalidTimestamp
} }
// 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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment