Skip to content

consensus: mark envelopes non-exhaustive#456

Merged
prestwich merged 1 commit intoalloy-rs:mainfrom
yash-atreya:mark_env_ne
Apr 5, 2024
Merged

consensus: mark envelopes non-exhaustive#456
prestwich merged 1 commit intoalloy-rs:mainfrom
yash-atreya:mark_env_ne

Conversation

@yash-atreya
Copy link
Contributor

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

| 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
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