Skip to content

Commit b2c59e2

Browse files
authored
consensus/clique: make internal error private (#21132)
Co-authored-by: linjing <linjingjing@baidu.com>
1 parent 9219e0f commit b2c59e2

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎consensus/clique/clique.go‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,9 +121,9 @@ var (
121121
// turn of the signer.
122122
errWrongDifficulty = errors.New("wrong difficulty")
123123

124-
// ErrInvalidTimestamp is returned if the timestamp of a block is lower than
124+
// errInvalidTimestamp is returned if the timestamp of a block is lower than
125125
// the previous block's timestamp + the minimum block period.
126-
ErrInvalidTimestamp = errors.New("invalid timestamp")
126+
errInvalidTimestamp = errors.New("invalid timestamp")
127127

128128
// errInvalidVotingChain is returned if an authorization list is attempted to
129129
// be modified via out-of-range or non-contiguous headers.
@@ -322,7 +322,7 @@ func (c *Clique) verifyCascadingFields(chain consensus.ChainReader, header *type
322322
return consensus.ErrUnknownAncestor
323323
}
324324
if parent.Time+c.config.Period > header.Time {
325-
return ErrInvalidTimestamp
325+
return errInvalidTimestamp
326326
}
327327
// Retrieve the snapshot needed to verify this header and cache it
328328
snap, err := c.snapshot(chain, number-1, header.ParentHash, parents)

0 commit comments

Comments
 (0)