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

test: add tests to verify block hash changes if the input change. #275

Merged
merged 1 commit into from
Jun 16, 2024

Conversation

AvivYossef-starkware
Copy link
Contributor

@AvivYossef-starkware AvivYossef-starkware commented Jun 10, 2024

This change is Reviewable

Copy link
Collaborator

@dorimedini-starkware dorimedini-starkware left a comment

Choose a reason for hiding this comment

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

Reviewed 1 of 1 files at r1, all commit messages.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @AvivYossef-starkware)


src/block_hash/block_hash_calculator_test.rs line 32 at r1 (raw file):

            $(
                // Test changing the field in the header

Suggestion:

// Test changing the field in the header.

src/block_hash/block_hash_calculator_test.rs line 34 at r1 (raw file):

                // Test changing the field in the header
                let mut modified_header = $header.clone();
                change_field_value(&mut modified_header.$header_field);

does this work?

Suggestion:

modified_header.$header_field = Default::default();

src/block_hash/block_hash_calculator_test.rs line 42 at r1 (raw file):

                // Test changing the field in the commitments
                let mut modified_commitments = $commitments.clone();
                change_field_value(&mut modified_commitments.$commitments_field);

does this work?

Suggestion:

modified_commitments.$commitments_field = Default::default();

@AvivYossef-starkware AvivYossef-starkware force-pushed the aviv/test_block_hash_inputs branch from 69f2e8c to 45f7639 Compare June 16, 2024 08:10
@AvivYossef-starkware AvivYossef-starkware force-pushed the aviv/test_block_hash_inputs branch from 45f7639 to 422e7b4 Compare June 16, 2024 08:13
Copy link
Contributor Author

@AvivYossef-starkware AvivYossef-starkware left a comment

Choose a reason for hiding this comment

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

Reviewable status: 0 of 1 files reviewed, 2 unresolved discussions (waiting on @dorimedini-starkware)


src/block_hash/block_hash_calculator_test.rs line 34 at r1 (raw file):

Previously, dorimedini-starkware wrote…

does this work?

Yes.


src/block_hash/block_hash_calculator_test.rs line 42 at r1 (raw file):

Previously, dorimedini-starkware wrote…

does this work?

Yes.

Copy link
Collaborator

@dorimedini-starkware dorimedini-starkware left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewed 1 of 1 files at r2, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @AvivYossef-starkware)

@AvivYossef-starkware AvivYossef-starkware merged commit 0845b3a into main Jun 16, 2024
6 checks passed
@AvivYossef-starkware AvivYossef-starkware deleted the aviv/test_block_hash_inputs branch June 16, 2024 08:45
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