diff --git a/simulators/ethereum/engine/clmock.go b/simulators/ethereum/engine/clmock.go index bbd8f574b8..b9ae324fd7 100644 --- a/simulators/ethereum/engine/clmock.go +++ b/simulators/ethereum/engine/clmock.go @@ -341,6 +341,7 @@ type BlockProcessCallbacks struct { OnForkchoiceBroadcast func() OnSafeBlockChange func() OnFinalizedBlockChange func() + OnBlockProductionEnd func() } func (cl *CLMocker) produceSingleBlock(callbacks BlockProcessCallbacks) { @@ -451,6 +452,9 @@ func (cl *CLMocker) produceSingleBlock(callbacks BlockProcessCallbacks) { cl.Fatalf("CLMocker: None of the clients accepted the newly constructed payload") } + if callbacks.OnBlockProductionEnd != nil { + callbacks.OnBlockProductionEnd() + } } // Loop produce PoS blocks by using the Engine API diff --git a/simulators/ethereum/engine/enginetests.go b/simulators/ethereum/engine/enginetests.go index 5aeb904282..537daafe8f 100644 --- a/simulators/ethereum/engine/enginetests.go +++ b/simulators/ethereum/engine/enginetests.go @@ -1496,7 +1496,7 @@ func reorgBack(t *TestEnv) { // Produce blocks before starting the test (So we don't try to reorg back to the genesis block) t.CLMock.produceBlocks(5, BlockProcessCallbacks{ - OnForkchoiceBroadcast: func() { + OnBlockProductionEnd: func() { // Send a fcU with the HeadBlockHash pointing back to the previous block forkchoiceUpdatedBack := ForkchoiceStateV1{ HeadBlockHash: previousHash,