mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
feat: make addons stateful (#11204)
Co-authored-by: Arsenii Kulikov <klkvrr@gmail.com>
This commit is contained in:
@ -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
|
||||
|
||||
@ -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();
|
||||
|
||||
@ -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?;
|
||||
|
||||
|
||||
@ -81,7 +81,7 @@ fn main() {
|
||||
.with_components(
|
||||
EthereumNode::components().payload(CustomPayloadBuilder::default()),
|
||||
)
|
||||
.with_add_ons::<EthereumAddOns>()
|
||||
.with_add_ons(EthereumAddOns::default())
|
||||
.launch()
|
||||
.await?;
|
||||
|
||||
|
||||
@ -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();
|
||||
|
||||
Reference in New Issue
Block a user