Skip to content

Commit 6561c6d

Browse files
eth/catalyst: fix trigger transition
1 parent c106ce3 commit 6561c6d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

eth/catalyst/api.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -504,6 +504,11 @@ func (api *ConsensusAPI) setHead(newHead common.Hash) error {
504504
}
505505
headBlock := api.eth.BlockChain().CurrentBlock()
506506
if headBlock.Hash() == newHead {
507+
// Trigger the transition if it's the first `NewHead` event.
508+
merger := api.merger()
509+
if !merger.PoSFinalized() {
510+
merger.FinalizePoS()
511+
}
507512
return nil
508513
}
509514
newHeadBlock := api.eth.BlockChain().GetBlockByHash(newHead)

0 commit comments

Comments
 (0)