From ea47939de4e0b6a8f013b1653a0a4fb3bf404778 Mon Sep 17 00:00:00 2001 From: Matthias Seitz Date: Thu, 18 Jul 2024 14:07:58 +0200 Subject: [PATCH] feat: allow custom provider type (#9606) --- crates/node/builder/src/builder/mod.rs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/crates/node/builder/src/builder/mod.rs b/crates/node/builder/src/builder/mod.rs index f3c8889ea3..ce371f2218 100644 --- a/crates/node/builder/src/builder/mod.rs +++ b/crates/node/builder/src/builder/mod.rs @@ -29,7 +29,7 @@ use reth_node_core::{ rpc::eth::{helpers::AddDevSigners, FullEthApiServer}, }; use reth_primitives::revm_primitives::EnvKzgSettings; -use reth_provider::{providers::BlockchainProvider, ChainSpecProvider}; +use reth_provider::{providers::BlockchainProvider, ChainSpecProvider, FullProvider}; use reth_tasks::TaskExecutor; use reth_transaction_pool::{PoolConfig, TransactionPool}; use secp256k1::SecretKey; @@ -207,6 +207,17 @@ where pub fn with_types(self) -> NodeBuilderWithTypes> where T: NodeTypes, + { + self.with_types_and_provider() + } + + /// Configures the types of the node and the provider type that will be used by the node. + pub fn with_types_and_provider( + self, + ) -> NodeBuilderWithTypes> + where + T: NodeTypes, + P: FullProvider, { NodeBuilderWithTypes::new(self.config, self.database) }