Make PostExectuionInput generic over receipt (#12814)

Co-authored-by: Emilia Hane <elsaemiliaevahane@gmail.com>
This commit is contained in:
0xriazaka.eth
2024-11-24 07:53:01 +01:00
committed by GitHub
parent 9b289351b6
commit 6695d07c65

View File

@ -30,16 +30,16 @@ pub mod test_utils;
/// Post execution input passed to [`Consensus::validate_block_post_execution`].
#[derive(Debug)]
pub struct PostExecutionInput<'a> {
pub struct PostExecutionInput<'a, R = Receipt> {
/// Receipts of the block.
pub receipts: &'a [Receipt],
pub receipts: &'a [R],
/// EIP-7685 requests of the block.
pub requests: &'a Requests,
}
impl<'a> PostExecutionInput<'a> {
impl<'a, R> PostExecutionInput<'a, R> {
/// Creates a new instance of `PostExecutionInput`.
pub const fn new(receipts: &'a [Receipt], requests: &'a Requests) -> Self {
pub const fn new(receipts: &'a [R], requests: &'a Requests) -> Self {
Self { receipts, requests }
}
}