@@ -28,7 +28,6 @@ import (
28
28
"github.com/ethereum/go-ethereum/core/overlay"
29
29
"github.com/ethereum/go-ethereum/core/state"
30
30
"github.com/ethereum/go-ethereum/core/types"
31
- "github.com/ethereum/go-ethereum/log"
32
31
"github.com/ethereum/go-ethereum/params"
33
32
"github.com/ethereum/go-ethereum/rpc"
34
33
"github.com/ethereum/go-ethereum/trie"
@@ -346,6 +345,14 @@ func (beacon *Beacon) Prepare(chain consensus.ChainHeaderReader, header *types.H
346
345
347
346
// Finalize implements consensus.Engine and processes withdrawals on top.
348
347
func (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
+ }
349
356
if ! beacon .IsPoSHeader (header ) {
350
357
beacon .ethone .Finalize (chain , header , state , txs , uncles , nil )
351
358
return
@@ -361,14 +368,6 @@ func (beacon *Beacon) Finalize(chain consensus.ChainHeaderReader, header *types.
361
368
state .Witness ().TouchFullAccount (w .Address [:], true )
362
369
}
363
370
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
- }
372
371
}
373
372
374
373
// FinalizeAndAssemble implements consensus.Engine, setting the final state and
0 commit comments