mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
feat: relax provider bounds (#12857)
This commit is contained in:
@ -25,7 +25,7 @@ use reth_fs_util as fs;
|
||||
use reth_node_api::{BlockTy, EngineApiMessageVersion, PayloadBuilderAttributes};
|
||||
use reth_node_ethereum::{EthEvmConfig, EthExecutorProvider};
|
||||
use reth_primitives::{
|
||||
BlobTransaction, BlockExt, PooledTransactionsElement, SealedBlock, SealedBlockWithSenders,
|
||||
BlobTransaction, BlockExt, PooledTransactionsElement, SealedBlockFor, SealedBlockWithSenders,
|
||||
SealedHeader, Transaction, TransactionSigned,
|
||||
};
|
||||
use reth_provider::{
|
||||
@ -90,7 +90,7 @@ impl<C: ChainSpecParser<ChainSpec = ChainSpec>> Command<C> {
|
||||
fn lookup_best_block<N: ProviderNodeTypes<ChainSpec = C::ChainSpec>>(
|
||||
&self,
|
||||
factory: ProviderFactory<N>,
|
||||
) -> RethResult<Arc<SealedBlock>> {
|
||||
) -> RethResult<Arc<SealedBlockFor<BlockTy<N>>>> {
|
||||
let provider = factory.provider()?;
|
||||
|
||||
let best_number =
|
||||
|
||||
@ -19,6 +19,7 @@ use reth_evm::execute::{BlockExecutorProvider, Executor};
|
||||
use reth_execution_types::ExecutionOutcome;
|
||||
use reth_network::{BlockDownloaderProvider, NetworkHandle};
|
||||
use reth_network_api::NetworkInfo;
|
||||
use reth_node_api::{BlockTy, NodePrimitives};
|
||||
use reth_node_ethereum::EthExecutorProvider;
|
||||
use reth_primitives::BlockExt;
|
||||
use reth_provider::{
|
||||
@ -56,7 +57,12 @@ pub struct Command<C: ChainSpecParser> {
|
||||
}
|
||||
|
||||
impl<C: ChainSpecParser<ChainSpec = ChainSpec>> Command<C> {
|
||||
async fn build_network<N: ProviderNodeTypes<ChainSpec = C::ChainSpec>>(
|
||||
async fn build_network<
|
||||
N: ProviderNodeTypes<
|
||||
ChainSpec = C::ChainSpec,
|
||||
Primitives: NodePrimitives<Block = reth_primitives::Block>,
|
||||
>,
|
||||
>(
|
||||
&self,
|
||||
config: &Config,
|
||||
task_executor: TaskExecutor,
|
||||
@ -143,7 +149,7 @@ impl<C: ChainSpecParser<ChainSpec = ChainSpec>> Command<C> {
|
||||
(
|
||||
&block
|
||||
.clone()
|
||||
.unseal()
|
||||
.unseal::<BlockTy<N>>()
|
||||
.with_recovered_senders()
|
||||
.ok_or(BlockValidationError::SenderRecoveryError)?,
|
||||
merkle_block_td + block.difficulty,
|
||||
|
||||
@ -17,7 +17,7 @@ use reth_evm::execute::{BatchExecutor, BlockExecutorProvider};
|
||||
use reth_network::{BlockDownloaderProvider, NetworkHandle};
|
||||
use reth_network_api::NetworkInfo;
|
||||
use reth_network_p2p::full_block::FullBlockClient;
|
||||
use reth_node_api::BlockTy;
|
||||
use reth_node_api::{BlockTy, NodePrimitives};
|
||||
use reth_node_ethereum::EthExecutorProvider;
|
||||
use reth_provider::{
|
||||
providers::ProviderNodeTypes, BlockNumReader, BlockWriter, ChainSpecProvider,
|
||||
@ -56,7 +56,12 @@ pub struct Command<C: ChainSpecParser> {
|
||||
}
|
||||
|
||||
impl<C: ChainSpecParser<ChainSpec = ChainSpec>> Command<C> {
|
||||
async fn build_network<N: ProviderNodeTypes<ChainSpec = C::ChainSpec>>(
|
||||
async fn build_network<
|
||||
N: ProviderNodeTypes<
|
||||
ChainSpec = C::ChainSpec,
|
||||
Primitives: NodePrimitives<Block = reth_primitives::Block>,
|
||||
>,
|
||||
>(
|
||||
&self,
|
||||
config: &Config,
|
||||
task_executor: TaskExecutor,
|
||||
|
||||
@ -18,7 +18,7 @@ use reth_engine_util::engine_store::{EngineMessageStore, StoredEngineApiMessage}
|
||||
use reth_fs_util as fs;
|
||||
use reth_network::{BlockDownloaderProvider, NetworkHandle};
|
||||
use reth_network_api::NetworkInfo;
|
||||
use reth_node_api::{EngineApiMessageVersion, NodeTypesWithDBAdapter};
|
||||
use reth_node_api::{EngineApiMessageVersion, NodePrimitives, NodeTypesWithDBAdapter};
|
||||
use reth_node_ethereum::{EthEngineTypes, EthEvmConfig, EthExecutorProvider};
|
||||
use reth_payload_builder::{PayloadBuilderHandle, PayloadBuilderService};
|
||||
use reth_provider::{
|
||||
@ -55,7 +55,12 @@ pub struct Command<C: ChainSpecParser> {
|
||||
}
|
||||
|
||||
impl<C: ChainSpecParser<ChainSpec = ChainSpec>> Command<C> {
|
||||
async fn build_network<N: ProviderNodeTypes<ChainSpec = C::ChainSpec>>(
|
||||
async fn build_network<
|
||||
N: ProviderNodeTypes<
|
||||
ChainSpec = C::ChainSpec,
|
||||
Primitives: NodePrimitives<Block = reth_primitives::Block>,
|
||||
>,
|
||||
>(
|
||||
&self,
|
||||
config: &Config,
|
||||
task_executor: TaskExecutor,
|
||||
|
||||
Reference in New Issue
Block a user