all: tie timestamp based forks to the passage of London (#27279)

This commit is contained in:
Péter Szilágyi
2023-05-19 11:27:19 +03:00
committed by GitHub
parent 6a6318b1d2
commit 85a4b82b33
14 changed files with 31 additions and 29 deletions
+2 -2
View File
@@ -262,10 +262,10 @@ func (ethash *Ethash) verifyHeader(chain consensus.ChainHeaderReader, header, pa
if diff := new(big.Int).Sub(header.Number, parent.Number); diff.Cmp(big.NewInt(1)) != 0 {
return consensus.ErrInvalidNumber
}
if chain.Config().IsShanghai(header.Time) {
if chain.Config().IsShanghai(header.Number, header.Time) {
return fmt.Errorf("ethash does not support shanghai fork")
}
if chain.Config().IsCancun(header.Time) {
if chain.Config().IsCancun(header.Number, header.Time) {
return fmt.Errorf("ethash does not support cancun fork")
}
// Add some fake checks for tests