mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
feat: impl block for sealedblock (#12555)
This commit is contained in:
@ -1,10 +1,8 @@
|
||||
//! Block body abstraction.
|
||||
|
||||
use alloc::fmt;
|
||||
|
||||
use alloy_consensus::Transaction;
|
||||
|
||||
use crate::InMemorySize;
|
||||
use alloc::fmt;
|
||||
use alloy_consensus::Transaction;
|
||||
|
||||
/// Abstraction for block's body.
|
||||
pub trait BlockBody:
|
||||
@ -21,6 +19,7 @@ pub trait BlockBody:
|
||||
+ alloy_rlp::Encodable
|
||||
+ alloy_rlp::Decodable
|
||||
+ InMemorySize
|
||||
+ 'static
|
||||
{
|
||||
/// Ordered list of signed transactions as committed in block.
|
||||
// todo: requires trait for signed transaction
|
||||
|
||||
@ -1,11 +1,9 @@
|
||||
//! Block header data primitive.
|
||||
|
||||
use core::fmt;
|
||||
|
||||
use alloy_primitives::Sealable;
|
||||
use reth_codecs::Compact;
|
||||
|
||||
use crate::InMemorySize;
|
||||
use alloy_primitives::Sealable;
|
||||
use core::fmt;
|
||||
use reth_codecs::Compact;
|
||||
|
||||
/// Helper trait that unifies all behaviour required by block header to support full node
|
||||
/// operations.
|
||||
@ -28,6 +26,7 @@ pub trait BlockHeader:
|
||||
+ alloy_consensus::BlockHeader
|
||||
+ Sealable
|
||||
+ InMemorySize
|
||||
+ 'static
|
||||
{
|
||||
}
|
||||
|
||||
@ -47,5 +46,6 @@ impl<T> BlockHeader for T where
|
||||
+ alloy_consensus::BlockHeader
|
||||
+ Sealable
|
||||
+ InMemorySize
|
||||
+ 'static
|
||||
{
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user