mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 19:09:54 +00:00
Make PostExectuionInput generic over receipt (#12814)
Co-authored-by: Emilia Hane <elsaemiliaevahane@gmail.com>
This commit is contained in:
@ -30,16 +30,16 @@ pub mod test_utils;
|
|||||||
|
|
||||||
/// Post execution input passed to [`Consensus::validate_block_post_execution`].
|
/// Post execution input passed to [`Consensus::validate_block_post_execution`].
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub struct PostExecutionInput<'a> {
|
pub struct PostExecutionInput<'a, R = Receipt> {
|
||||||
/// Receipts of the block.
|
/// Receipts of the block.
|
||||||
pub receipts: &'a [Receipt],
|
pub receipts: &'a [R],
|
||||||
/// EIP-7685 requests of the block.
|
/// EIP-7685 requests of the block.
|
||||||
pub requests: &'a Requests,
|
pub requests: &'a Requests,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> PostExecutionInput<'a> {
|
impl<'a, R> PostExecutionInput<'a, R> {
|
||||||
/// Creates a new instance of `PostExecutionInput`.
|
/// 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 }
|
Self { receipts, requests }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user