Skip to content

Commit

Permalink
simulators/ethereum/engine: Minor fix to re-org tests (#934)
Browse files Browse the repository at this point in the history
simulators/ethereum/engine: minor fix to re-org tests
  • Loading branch information
marioevz authored Oct 27, 2023
1 parent 82e8954 commit 6eb7d4e
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions simulators/ethereum/engine/suites/engine/reorg.go
Original file line number Diff line number Diff line change
Expand Up @@ -529,13 +529,17 @@ func (spec ReOrgBackToCanonicalTest) Execute(t *test.Env) {
// Send a fcU with the HeadBlockHash pointing back to the previous block
forkchoiceUpdatedBack := api.ForkchoiceStateV1{
HeadBlockHash: previousHash,
SafeBlockHash: previousHash,
FinalizedBlockHash: previousHash,
SafeBlockHash: t.CLMock.LatestForkchoice.SafeBlockHash,
FinalizedBlockHash: t.CLMock.LatestForkchoice.FinalizedBlockHash,
}

// It is only expected that the client does not produce an error and the CL Mocker is able to progress after the re-org
r := t.TestEngine.TestEngineForkchoiceUpdated(&forkchoiceUpdatedBack, nil, previousTimestamp)
r.ExpectNoError()

// Re-send the ForkchoiceUpdated that the CLMock had sent
r = t.TestEngine.TestEngineForkchoiceUpdated(&t.CLMock.LatestForkchoice, nil, t.CLMock.LatestExecutedPayload.Timestamp)
r.ExpectNoError()
},
})
}
Expand Down

0 comments on commit 6eb7d4e

Please sign in to comment.