mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 19:09:54 +00:00
chore: rm receiptsext trait (#13296)
This commit is contained in:
@ -1,19 +1,16 @@
|
||||
//! Receipt abstraction
|
||||
|
||||
use crate::{InMemorySize, MaybeArbitrary, MaybeCompact, MaybeSerde};
|
||||
use alloc::vec::Vec;
|
||||
use core::fmt;
|
||||
|
||||
use alloy_consensus::{
|
||||
Eip2718EncodableReceipt, RlpDecodableReceipt, RlpEncodableReceipt, TxReceipt, Typed2718,
|
||||
};
|
||||
use alloy_primitives::B256;
|
||||
|
||||
use crate::{InMemorySize, MaybeArbitrary, MaybeCompact, MaybeSerde};
|
||||
use core::fmt;
|
||||
|
||||
/// Helper trait that unifies all behaviour required by receipt to support full node operations.
|
||||
pub trait FullReceipt: Receipt + MaybeCompact {}
|
||||
|
||||
impl<T> FullReceipt for T where T: ReceiptExt + MaybeCompact {}
|
||||
impl<T> FullReceipt for T where T: Receipt + MaybeCompact {}
|
||||
|
||||
/// Abstraction of a receipt.
|
||||
#[auto_impl::auto_impl(&, Arc)]
|
||||
@ -35,12 +32,6 @@ pub trait Receipt:
|
||||
{
|
||||
}
|
||||
|
||||
/// Extension if [`Receipt`] used in block execution.
|
||||
pub trait ReceiptExt: Receipt {
|
||||
/// Calculates the receipts root of the given receipts.
|
||||
fn receipts_root(receipts: &[&Self]) -> B256;
|
||||
}
|
||||
|
||||
/// Retrieves gas spent by transactions as a vector of tuples (transaction index, gas used).
|
||||
pub fn gas_spent_by_transactions<I, T>(receipts: I) -> Vec<(u64, u64)>
|
||||
where
|
||||
|
||||
Reference in New Issue
Block a user