mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
chore(sdk): Add InMemorySize as super trait (#12615)
This commit is contained in:
@ -7,6 +7,8 @@ use core::fmt;
|
||||
use reth_codecs::Compact;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
use crate::InMemorySize;
|
||||
|
||||
/// Helper trait that unifies all behaviour required by receipt to support full node operations.
|
||||
pub trait FullReceipt: Receipt + Compact {}
|
||||
|
||||
@ -25,6 +27,7 @@ pub trait Receipt:
|
||||
+ alloy_rlp::Encodable
|
||||
+ alloy_rlp::Decodable
|
||||
+ Serialize
|
||||
+ InMemorySize
|
||||
+ for<'de> Deserialize<'de>
|
||||
{
|
||||
/// Returns transaction type.
|
||||
|
||||
@ -8,7 +8,7 @@ use alloy_primitives::{keccak256, Address, PrimitiveSignature, TxHash, B256};
|
||||
use reth_codecs::Compact;
|
||||
use revm_primitives::TxEnv;
|
||||
|
||||
use crate::{FullTransaction, MaybeArbitrary, Transaction};
|
||||
use crate::{FullTransaction, InMemorySize, MaybeArbitrary, Transaction};
|
||||
|
||||
/// Helper trait that unifies all behaviour required by block to support full node operations.
|
||||
pub trait FullSignedTx: SignedTransaction<Transaction: FullTransaction> + Compact {}
|
||||
@ -35,6 +35,7 @@ pub trait SignedTransaction:
|
||||
+ Decodable2718
|
||||
+ alloy_consensus::Transaction
|
||||
+ MaybeArbitrary
|
||||
+ InMemorySize
|
||||
{
|
||||
/// Transaction type that is signed.
|
||||
type Transaction: Transaction;
|
||||
|
||||
@ -3,6 +3,8 @@ use core::fmt;
|
||||
use alloy_primitives::{U64, U8};
|
||||
use reth_codecs::Compact;
|
||||
|
||||
use crate::InMemorySize;
|
||||
|
||||
/// Helper trait that unifies all behaviour required by transaction type ID to support full node
|
||||
/// operations.
|
||||
pub trait FullTxType: TxType + Compact {}
|
||||
@ -29,6 +31,7 @@ pub trait TxType:
|
||||
+ TryFrom<U64>
|
||||
+ alloy_rlp::Encodable
|
||||
+ alloy_rlp::Decodable
|
||||
+ InMemorySize
|
||||
{
|
||||
/// Returns `true` if this is a legacy transaction.
|
||||
fn is_legacy(&self) -> bool;
|
||||
|
||||
Reference in New Issue
Block a user