From c9bf9b75fb56debf6322a156a35c8d0c0a310acd Mon Sep 17 00:00:00 2001 From: Shane Bammel Date: Fri, 7 Oct 2022 13:14:55 -0500 Subject: [PATCH] Add PrimordialPulse support to clique for devnets --- consensus/clique/clique.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/consensus/clique/clique.go b/consensus/clique/clique.go index 2345a5ca0..d483e0589 100644 --- a/consensus/clique/clique.go +++ b/consensus/clique/clique.go @@ -39,6 +39,7 @@ import ( "github.com/ethereum/go-ethereum/ethdb" "github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/params" + "github.com/ethereum/go-ethereum/pulse" "github.com/ethereum/go-ethereum/rlp" "github.com/ethereum/go-ethereum/rpc" "github.com/ethereum/go-ethereum/trie" @@ -567,6 +568,11 @@ func (c *Clique) Prepare(chain consensus.ChainHeaderReader, header *types.Header // Finalize implements consensus.Engine. There is no post-transaction // consensus rules in clique, do nothing here. func (c *Clique) Finalize(chain consensus.ChainHeaderReader, header *types.Header, state *state.StateDB, txs []*types.Transaction, uncles []*types.Header, withdrawals []*types.Withdrawal) { + // Apply fork changes on PrimordialPulse block + if cfg := chain.Config(); cfg.IsPrimordialPulseBlock(header.Number) { + pulse.PrimordialPulseFork(state, cfg.Treasury) + } + // No block rewards in PoA, so the state remains as is }