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

feat: full block ambiguity #832

Merged
merged 1 commit into from
Jun 5, 2024
Merged

feat: full block ambiguity #832

merged 1 commit into from
Jun 5, 2024

Conversation

mattsse
Copy link
Member

@mattsse mattsse commented Jun 5, 2024

closes #805

this changes the deserialization order, so empty response is deserialized as Full

this adds an additional check to get_block_by calls to enforce hashes

Copy link
Contributor

@Rjected Rjected left a comment

Choose a reason for hiding this comment

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

lgtm

Comment on lines +444 to +449
.map(|mut block| {
if !hydrate {
// this ensures an empty response for `Hashes` has the expected form
// this is required because deserializing [] is ambiguous
block.transactions.convert_to_hashes();
}
Copy link
Contributor

Choose a reason for hiding this comment

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

nice, this pattern makes sense

@mattsse mattsse merged commit 05f8162 into main Jun 5, 2024
24 checks passed
@mattsse mattsse deleted the matt/fix-full-ambiguity branch June 5, 2024 21:39
ben186 pushed a commit to ben186/alloy that referenced this pull request Jul 27, 2024
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.

[Bug] Confusing BlockTransactions::Uncle variant
2 participants