chore(sdk): auto trait bounds NodePrimitives (#12398)

This commit is contained in:
Emilia Hane
2024-11-10 13:56:36 +01:00
committed by GitHub
parent c1b4fd84c5
commit 23ec0af51d
3 changed files with 11 additions and 8 deletions

View File

@ -8,24 +8,27 @@
#![cfg_attr(not(test), warn(unused_crate_dependencies))]
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
pub use reth_primitives_traits::{Block, BlockBody};
use core::fmt;
use std::marker::PhantomData;
use reth_chainspec::EthChainSpec;
use reth_db_api::{
database_metrics::{DatabaseMetadata, DatabaseMetrics},
Database,
};
use reth_engine_primitives::EngineTypes;
pub use reth_primitives_traits::{Block, BlockBody};
use reth_trie_db::StateCommitment;
use std::marker::PhantomData;
/// Configures all the primitive types of the node.
pub trait NodePrimitives {
pub trait NodePrimitives: Send + Sync + Unpin + Clone + Default + fmt::Debug {
/// Block primitive.
type Block;
type Block: Send + Sync + Unpin + Clone + Default + fmt::Debug + 'static;
/// Signed version of the transaction type.
type SignedTx;
type SignedTx: Send + Sync + Unpin + Clone + Default + fmt::Debug + 'static;
/// A receipt.
type Receipt;
type Receipt: Send + Sync + Unpin + Clone + Default + fmt::Debug + 'static;
}
impl NodePrimitives for () {