feat: trait-based storage API (#12616)

Co-authored-by: joshie <93316087+joshieDo@users.noreply.github.com>
This commit is contained in:
Arsenii Kulikov
2024-11-19 19:39:28 +04:00
committed by GitHub
parent 66a9d3e424
commit 1e7189d3e4
36 changed files with 486 additions and 149 deletions

View File

@ -10,9 +10,9 @@ use reth_codecs::Compact;
use crate::{BlockHeader, FullBlockHeader, InMemorySize, MaybeSerde};
/// Helper trait that unifies all behaviour required by block to support full node operations.
pub trait FullBlock: Block<Header: Compact> + Compact {}
pub trait FullBlock: Block<Header: Compact> {}
impl<T> FullBlock for T where T: Block<Header: FullBlockHeader> + Compact {}
impl<T> FullBlock for T where T: Block<Header: FullBlockHeader> {}
/// Abstraction of block data type.
// todo: make sealable super-trait, depends on <https://github.com/paradigmxyz/reth/issues/11449>