@@ -28,7 +28,6 @@ import (
2828 "github.com/ethereum/go-ethereum/core/overlay"
2929 "github.com/ethereum/go-ethereum/core/state"
3030 "github.com/ethereum/go-ethereum/core/types"
31- "github.com/ethereum/go-ethereum/log"
3231 "github.com/ethereum/go-ethereum/params"
3332 "github.com/ethereum/go-ethereum/rpc"
3433 "github.com/ethereum/go-ethereum/trie"
@@ -346,6 +345,14 @@ func (beacon *Beacon) Prepare(chain consensus.ChainHeaderReader, header *types.H
346345
347346// Finalize implements consensus.Engine and processes withdrawals on top.
348347func (beacon * Beacon ) Finalize (chain consensus.ChainHeaderReader , header * types.Header , state * state.StateDB , txs []* types.Transaction , uncles []* types.Header , withdrawals []* types.Withdrawal ) {
348+ if chain .Config ().IsPrague (header .Number , header .Time ) {
349+ // uncomment when debugging
350+ // fmt.Println("at block", header.Number, "performing transition?", state.Database().InTransition())
351+ parent := chain .GetHeaderByHash (header .ParentHash )
352+ if err := overlay .OverlayVerkleTransition (state , parent .Root , chain .Config ().OverlayStride ); err != nil {
353+ panic (err )
354+ }
355+ }
349356 if ! beacon .IsPoSHeader (header ) {
350357 beacon .ethone .Finalize (chain , header , state , txs , uncles , nil )
351358 return
@@ -361,14 +368,6 @@ func (beacon *Beacon) Finalize(chain consensus.ChainHeaderReader, header *types.
361368 state .Witness ().TouchFullAccount (w .Address [:], true )
362369 }
363370
364- if chain .Config ().IsPrague (header .Number , header .Time ) {
365- // uncomment when debugging
366- // fmt.Println("at block", header.Number, "performing transition?", state.Database().InTransition())
367- parent := chain .GetHeaderByHash (header .ParentHash )
368- if err := overlay .OverlayVerkleTransition (state , parent .Root , chain .Config ().OverlayStride ); err != nil {
369- log .Error ("error performing the transition" , "err" , err )
370- }
371- }
372371}
373372
374373// FinalizeAndAssemble implements consensus.Engine, setting the final state and
0 commit comments