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

Client: Fcu handles if headBlockHash is an old block #1820

Merged
merged 1 commit into from
Mar 28, 2022

Conversation

cbrzn
Copy link
Contributor

@cbrzn cbrzn commented Mar 28, 2022

With this PR, I aim to tackle: Latest block after reorg from the Hive tests. Which makes sure that forkchoiceUpdated method is able to reorg if a previous block was sent as headBlockHash

@codecov
Copy link

codecov bot commented Mar 28, 2022

Codecov Report

Merging #1820 (29a66c7) into master (739f839) will increase coverage by 1.26%.
The diff coverage is n/a.

Impacted file tree graph

Flag Coverage Δ
block ?
blockchain 83.82% <ø> (ø)
client ?
common ?
devp2p ?
ethash ?
trie ?
tx 88.20% <ø> (ø)
util ?
vm 81.58% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

@@ -141,7 +141,7 @@ tape(`${method}: call with valid fork choice state without payload attributes`,
const req = params(method, [validForkChoiceState])
const expectRes = (res: any) => {
t.equal(res.body.result.payloadStatus.status, 'VALID')
t.equal(res.body.result.payloadStatus.latestValidHash, null)
t.equal(res.body.result.payloadStatus.latestValidHash, validForkChoiceState.headBlockHash)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This has been changed because I noticed that when fcu returns VALID it also returns the latestValidHash (Point 7 of specs)

Copy link
Contributor

@ryanio ryanio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks great, thanks!

@ryanio ryanio merged commit a87bccd into master Mar 28, 2022
@ryanio ryanio deleted the engine/fcu-latest-block-after-reorg branch March 28, 2022 20:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants