aboutsummaryrefslogtreecommitdiffstats
path: root/consensus/clique/clique.go
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2017-10-10 16:54:47 +0800
committerFelix Lange <fjl@users.noreply.github.com>2017-10-10 16:54:47 +0800
commitd3beff7e209cd82bcd044f51501886d926ce1b8a (patch)
treed4c0b3ce4748db4a1c22e6f9d3363eaed3e6384c /consensus/clique/clique.go
parent40a3856af9d28fce6550509a01cf926525da5d22 (diff)
downloadgo-tangerine-d3beff7e209cd82bcd044f51501886d926ce1b8a.tar
go-tangerine-d3beff7e209cd82bcd044f51501886d926ce1b8a.tar.gz
go-tangerine-d3beff7e209cd82bcd044f51501886d926ce1b8a.tar.bz2
go-tangerine-d3beff7e209cd82bcd044f51501886d926ce1b8a.tar.lz
go-tangerine-d3beff7e209cd82bcd044f51501886d926ce1b8a.tar.xz
go-tangerine-d3beff7e209cd82bcd044f51501886d926ce1b8a.tar.zst
go-tangerine-d3beff7e209cd82bcd044f51501886d926ce1b8a.zip
consensus/clique: add fork hash enforcement (#15236)
Diffstat (limited to 'consensus/clique/clique.go')
-rw-r--r--consensus/clique/clique.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/consensus/clique/clique.go b/consensus/clique/clique.go
index d2fb6934b..8d6cf653d 100644
--- a/consensus/clique/clique.go
+++ b/consensus/clique/clique.go
@@ -29,6 +29,7 @@ import (
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/common/hexutil"
"github.com/ethereum/go-ethereum/consensus"
+ "github.com/ethereum/go-ethereum/consensus/misc"
"github.com/ethereum/go-ethereum/core/state"
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/crypto"
@@ -313,6 +314,10 @@ func (c *Clique) verifyHeader(chain consensus.ChainReader, header *types.Header,
return errInvalidDifficulty
}
}
+ // If all checks passed, validate any special fields for hard forks
+ if err := misc.VerifyForkHashes(chain.Config(), header, false); err != nil {
+ return err
+ }
// All basic checks passed, verify cascading fields
return c.verifyCascadingFields(chain, header, parents)
}