feat(OpReceipt): add into_receipt (#16156)

This commit is contained in:
Hai | RISE
2025-05-12 14:54:27 +07:00
committed by GitHub
parent b1a1da1062
commit bda7f4a6d5

View File

@@ -61,6 +61,17 @@ impl OpReceipt {
}
}
/// Consumes this and returns the inner [`Receipt`].
pub fn into_receipt(self) -> Receipt {
match self {
Self::Legacy(receipt) |
Self::Eip2930(receipt) |
Self::Eip1559(receipt) |
Self::Eip7702(receipt) => receipt,
Self::Deposit(receipt) => receipt.inner,
}
}
/// Returns length of RLP-encoded receipt fields with the given [`Bloom`] without an RLP header.
pub fn rlp_encoded_fields_length(&self, bloom: &Bloom) -> usize {
match self {