From b2c59e297bb302068cbf0b50fccdcda9ba12134e Mon Sep 17 00:00:00 2001 From: sixdays Date: Wed, 27 May 2020 22:12:13 +0800 Subject: [PATCH] consensus/clique: make internal error private (#21132) Co-authored-by: linjing --- consensus/clique/clique.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/consensus/clique/clique.go b/consensus/clique/clique.go index 100c205292..1745575318 100644 --- a/consensus/clique/clique.go +++ b/consensus/clique/clique.go @@ -121,9 +121,9 @@ var ( // turn of the signer. 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. - ErrInvalidTimestamp = errors.New("invalid timestamp") + errInvalidTimestamp = errors.New("invalid timestamp") // errInvalidVotingChain is returned if an authorization list is attempted to // be modified via out-of-range or non-contiguous headers. @@ -322,7 +322,7 @@ func (c *Clique) verifyCascadingFields(chain consensus.ChainReader, header *type return consensus.ErrUnknownAncestor } if parent.Time+c.config.Period > header.Time { - return ErrInvalidTimestamp + return errInvalidTimestamp } // Retrieve the snapshot needed to verify this header and cache it snap, err := c.snapshot(chain, number-1, header.ParentHash, parents)