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

CHIA-1709 Pass a ValidationState to validate_unfinished_block_header #18818

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

AmineKhaldi
Copy link
Contributor

Purpose:

validate_unfinished_block_header takes expected_difficulty, expected_sub_slot_iters and prev_ses_block as separate parameters. Now that we have ValidationState, we can pass that directly.

Current Behavior:

validate_unfinished_block_header takes expected_difficulty, expected_sub_slot_iters and prev_ses_block as separate parameters.

New Behavior:

validate_unfinished_block_header takes a ValidationState instead.

@AmineKhaldi AmineKhaldi added Changed Required label for PR that categorizes merge commit message as "Changed" for changelog Cleanup Code cleanup labels Nov 5, 2024
@AmineKhaldi AmineKhaldi self-assigned this Nov 5, 2024
@AmineKhaldi AmineKhaldi marked this pull request as ready for review November 5, 2024 15:36
@AmineKhaldi AmineKhaldi requested a review from a team as a code owner November 5, 2024 15:36
@@ -43,12 +43,10 @@ def validate_unfinished_header_block(
blocks: BlockRecordsProtocol,
header_block: UnfinishedHeaderBlock,
check_filter: bool,
expected_difficulty: uint64,
Copy link
Contributor

Choose a reason for hiding this comment

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

this is a little confusing but the naming is important here, its actually not the current difficulty and sub slot iters but the difficulty and sub slot iters expected to be in the block, idk if maybe we should rename ValidationState params to difficulty and sub_slot_iters and add a comment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Changed Required label for PR that categorizes merge commit message as "Changed" for changelog Cleanup Code cleanup
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants