Skip to content

Commit c49a416

Browse files
gballetfjl
authored andcommitted
consensus/ethash: fix a typo and error message (#20503)
1 parent a1bc0e3 commit c49a416

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

consensus/ethash/consensus.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ var (
6868
// codebase, inherently breaking if the engine is swapped out. Please put common
6969
// error types into the consensus package.
7070
var (
71-
errZeroBlockTime = errors.New("timestamp equals parent's")
71+
errOlderBlockTime = errors.New("timestamp older than parent")
7272
errTooManyUncles = errors.New("too many uncles")
7373
errDuplicateUncle = errors.New("duplicate uncle")
7474
errUncleIsAncestor = errors.New("uncle is ancestor")
@@ -255,9 +255,9 @@ func (ethash *Ethash) verifyHeader(chain consensus.ChainReader, header, parent *
255255
}
256256
}
257257
if header.Time <= parent.Time {
258-
return errZeroBlockTime
258+
return errOlderBlockTime
259259
}
260-
// Verify the block's difficulty based in its timestamp and parent's difficulty
260+
// Verify the block's difficulty based on its timestamp and parent's difficulty
261261
expected := ethash.CalcDifficulty(chain, header.Time, parent)
262262

263263
if expected.Cmp(header.Difficulty) != 0 {

0 commit comments

Comments
 (0)