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

consensus: mark envelopes non-exhaustive #456

Merged
merged 1 commit into from
Apr 5, 2024

Conversation

yash-atreya
Copy link
Member

Motivation

Ref #451

Solution

PR Checklist

  • Added Tests
  • Added Documentation
  • Breaking changes

Copy link
Contributor

@Evalir Evalir left a comment

Choose a reason for hiding this comment

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

agreed that these are needed—shouldn't be much of an issue downstream other than having to add the wildcard when pattern matching

@@ -68,6 +68,7 @@ impl TransactionReceipt {
| ReceiptEnvelope::Eip2930(receipt)
| ReceiptEnvelope::Eip4844(receipt)
| ReceiptEnvelope::Legacy(receipt) => receipt.receipt.status,
_ => false,
Copy link
Member

Choose a reason for hiding this comment

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

Followup work:

  • trait Receipt in alloy-network
  • Receipt bound on type Recept in trait Network
  • fn status in trait Receipt
  • impl Receipt for ReceiptEnvelope and related types
  • change this function to a delegate to Receipt

@prestwich
Copy link
Member

rebased to resolve conflict with #461

@prestwich prestwich merged commit e3f2f07 into alloy-rs:main Apr 5, 2024
18 checks passed
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.

3 participants