feat: make addons stateful (#11204)

Co-authored-by: Arsenii Kulikov <klkvrr@gmail.com>
This commit is contained in:
Matthias Seitz
2024-10-04 08:34:37 +02:00
committed by GitHub
parent ab06997986
commit 84370b81d7
19 changed files with 75 additions and 25 deletions

View File

@ -253,6 +253,10 @@ where
.consensus(EthereumConsensusBuilder::default())
.engine_validator(CustomEngineValidatorBuilder::default())
}
fn add_ons(&self) -> Self::AddOns {
EthereumAddOns::default()
}
}
/// A custom payload service builder that supports the custom engine types

View File

@ -226,7 +226,7 @@ async fn main() -> eyre::Result<()> {
.executor(MyExecutorBuilder::default())
.payload(MyPayloadBuilder::default()),
)
.with_add_ons::<EthereumAddOns>()
.with_add_ons(EthereumAddOns::default())
.launch()
.await
.unwrap();

View File

@ -25,7 +25,7 @@ fn main() {
// Configure the components of the node
// use default ethereum components but use our custom pool
.with_components(EthereumNode::components().pool(CustomPoolBuilder::default()))
.with_add_ons::<EthereumAddOns>()
.with_add_ons(EthereumAddOns::default())
.launch()
.await?;

View File

@ -81,7 +81,7 @@ fn main() {
.with_components(
EthereumNode::components().payload(CustomPayloadBuilder::default()),
)
.with_add_ons::<EthereumAddOns>()
.with_add_ons(EthereumAddOns::default())
.launch()
.await?;

View File

@ -263,7 +263,7 @@ async fn main() -> eyre::Result<()> {
.with_types::<EthereumNode>()
// use default ethereum components but with our executor
.with_components(EthereumNode::components().executor(MyExecutorBuilder::default()))
.with_add_ons::<EthereumAddOns>()
.with_add_ons(EthereumAddOns::default())
.launch()
.await
.unwrap();