Skip to content

forkchoice store: add break in walk back - #191

Merged
tcoratger merged 1 commit into
leanEthereum:mainfrom
tcoratger:get_attestation_target
Nov 25, 2025
Merged

forkchoice store: add break in walk back#191
tcoratger merged 1 commit into
leanEthereum:mainfrom
tcoratger:get_attestation_target

Conversation

@tcoratger

Copy link
Copy Markdown
Collaborator

🗒️ Description

@unnawut If the statement if self.blocks[target_block_root].slot > self.blocks[self.safe_target].slot is false then we can just break the loop because it will not be true in the next iteration no?

🔗 Related Issues or PRs

✅ Checklist

  • Ran tox checks to avoid unnecessary CI fails:
    uvx tox
  • Considered adding appropriate tests for the changes.
  • Considered updating the online docs in the ./docs/ directory.

@unnawut unnawut left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Yep sounds right to me!

I think we can collapse for loop and if/else into a while loop as well but either way works

@tcoratger
tcoratger merged commit 7962398 into leanEthereum:main Nov 25, 2025
10 checks passed
@unnawut unnawut added this to the pq-devnet-1 milestone Nov 28, 2025
@unnawut unnawut added specs Scope: Changes to the specifications refactor Category: refactor labels Nov 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

refactor Category: refactor specs Scope: Changes to the specifications

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants