feat: add EthNodeLauncher (#9575)

This commit is contained in:
Matthias Seitz
2024-07-17 18:23:02 +02:00
committed by GitHub
parent 269c649b1a
commit e2814406ad
10 changed files with 331 additions and 10 deletions

View File

@ -60,9 +60,9 @@ impl<T: FullNodeTypes> NodeBuilderWithTypes<T> {
}
/// Container for the node's types and the database the node uses.
pub(crate) struct NodeTypesAdapter<T: FullNodeTypes> {
pub struct NodeTypesAdapter<T: FullNodeTypes> {
/// The database type used by the node.
pub(crate) database: T::DB,
pub database: T::DB,
}
impl<T: FullNodeTypes> NodeTypesAdapter<T> {
@ -152,13 +152,13 @@ pub struct NodeBuilderWithComponents<
AO: NodeAddOns<NodeAdapter<T, CB::Components>>,
> {
/// All settings for how the node should be configured.
pub(crate) config: NodeConfig,
pub config: NodeConfig,
/// Adapter for the underlying node types and database
pub(crate) adapter: NodeTypesAdapter<T>,
pub adapter: NodeTypesAdapter<T>,
/// container for type specific components
pub(crate) components_builder: CB,
pub components_builder: CB,
/// Additional node extensions.
pub(crate) add_ons: AddOns<NodeAdapter<T, CB::Components>, AO>,
pub add_ons: AddOns<NodeAdapter<T, CB::Components>, AO>,
}
impl<T, CB> NodeBuilderWithComponents<T, CB, ()>

View File

@ -252,7 +252,7 @@ impl<'a, Node: FullNodeComponents, EthApi> RpcContext<'a, Node, EthApi> {
}
/// Launch the rpc servers.
pub(crate) async fn launch_rpc_servers<Node, Engine, EthApi>(
pub async fn launch_rpc_servers<Node, Engine, EthApi>(
node: Node,
engine_api: Engine,
config: &NodeConfig,