feat: simplify PayloadBuilder setup (#14276)

This commit is contained in:
Arsenii Kulikov
2025-02-07 00:44:16 +04:00
committed by GitHub
parent 63d5feab33
commit 1f1eabc428
32 changed files with 278 additions and 366 deletions

View File

@ -12,6 +12,7 @@ reth-evm-ethereum.workspace = true
reth-node-api.workspace = true
reth-node-core.workspace = true
reth-primitives.workspace = true
reth-ethereum-payload-builder.workspace = true
reth-node-ethereum = { workspace = true, features = ["test-utils"] }
reth-tracing.workspace = true
reth-evm.workspace = true

View File

@ -204,12 +204,15 @@ where
PayloadBuilderAttributes = EthPayloadBuilderAttributes,
>,
{
async fn spawn_payload_service(
self,
type PayloadBuilder =
reth_ethereum_payload_builder::EthereumPayloadBuilder<Pool, Node::Provider, MyEvmConfig>;
async fn build_payload_builder(
&self,
ctx: &BuilderContext<Node>,
pool: Pool,
) -> eyre::Result<reth::payload::PayloadBuilderHandle<Types::Engine>> {
self.inner.spawn(MyEvmConfig::new(ctx.chain_spec()), ctx, pool)
) -> eyre::Result<Self::PayloadBuilder> {
self.inner.build(MyEvmConfig::new(ctx.chain_spec()), ctx, pool)
}
}
#[tokio::main]