feat: use ComponentsBuilder as associated type in Node trait (#7957)

This commit is contained in:
Matthias Seitz
2024-04-29 14:09:07 +02:00
committed by GitHub
parent 0501a43711
commit 3fc5cf6461
7 changed files with 50 additions and 106 deletions

View File

@ -202,13 +202,14 @@ impl<N> Node<N> for MyCustomNode
where
N: FullNodeTypes<Engine = CustomEngineTypes>,
{
type PoolBuilder = EthereumPoolBuilder;
type NetworkBuilder = EthereumNetworkBuilder;
type PayloadBuilder = CustomPayloadServiceBuilder;
type ComponentsBuilder = ComponentsBuilder<
N,
EthereumPoolBuilder,
CustomPayloadServiceBuilder,
EthereumNetworkBuilder,
>;
fn components(
self,
) -> ComponentsBuilder<N, Self::PoolBuilder, Self::PayloadBuilder, Self::NetworkBuilder> {
fn components_builder(self) -> Self::ComponentsBuilder {
ComponentsBuilder::default()
.node_types::<N>()
.pool(EthereumPoolBuilder::default())