Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

simulators/ethereum/engine: Minor fix to re-org tests #934

Merged
merged 1 commit into from
Oct 27, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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