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

Fix some forkchoice typos #5

Merged
merged 2 commits into from
Apr 17, 2024
Merged

Conversation

terencechain
Copy link

No description provided.


assert block.slot > slot
parent = store.blocks[block.parent_root]
if parent.slot > slot:
return get_ancestor(store, block.parent_root, slot)
if block.body.signed_execution_payload_header.message.parent_block_hash ==
parent.body.signed_execution_payload_header.message.block_hash:
if block.body.signed_execution_payload_header.message.parent_block_hash == parent.body.signed_execution_payload_header.message.block_hash:
Copy link
Author

Choose a reason for hiding this comment

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

I think this needs to be one line or python test generation will fail

@@ -150,7 +150,7 @@ def block_for_inclusion_list(store: Store, inclusion_list: InclusionList) -> Opt

blocks = blocks_for_slot(store, summary.slot)
for block in blocks:
if block.slot == summary.slot and block.proposer_index == summary.proposer_index and block.signed_execution_payload_header.message.parent_block_hash == parent_hash:
Copy link
Author

Choose a reason for hiding this comment

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

I dont think you need the slot check. Please correct me if I'm wrong here. blocks_for_slot(store, summary.slot) already covers that

Copy link
Owner

Choose a reason for hiding this comment

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

Nice one! thanks

@potuz potuz merged commit 018fa39 into potuz:epbs_stripped_out Apr 17, 2024
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants