mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
feat: add Primitives AT to BlockExecutorProvider (#12994)
This commit is contained in:
@ -1,10 +1,10 @@
|
||||
use futures_util::TryStreamExt;
|
||||
use reth::{api::FullNodeComponents, primitives::Block, providers::BlockReader};
|
||||
use reth::{api::FullNodeComponents, builder::NodeTypes, primitives::EthPrimitives};
|
||||
use reth_exex::{ExExContext, ExExEvent, ExExNotification};
|
||||
use reth_node_ethereum::EthereumNode;
|
||||
use reth_tracing::tracing::info;
|
||||
|
||||
async fn my_exex<Node: FullNodeComponents<Provider: BlockReader<Block = Block>>>(
|
||||
async fn my_exex<Node: FullNodeComponents<Types: NodeTypes<Primitives = EthPrimitives>>>(
|
||||
mut ctx: ExExContext<Node>,
|
||||
) -> eyre::Result<()> {
|
||||
while let Some(notification) = ctx.notifications.try_next().await? {
|
||||
|
||||
@ -3,7 +3,7 @@ use remote_exex::proto::{
|
||||
self,
|
||||
remote_ex_ex_server::{RemoteExEx, RemoteExExServer},
|
||||
};
|
||||
use reth::{primitives::Block, providers::BlockReader};
|
||||
use reth::{builder::NodeTypes, primitives::EthPrimitives};
|
||||
use reth_exex::{ExExContext, ExExEvent, ExExNotification};
|
||||
use reth_node_api::FullNodeComponents;
|
||||
use reth_node_ethereum::EthereumNode;
|
||||
@ -45,7 +45,7 @@ impl RemoteExEx for ExExService {
|
||||
}
|
||||
}
|
||||
|
||||
async fn remote_exex<Node: FullNodeComponents<Provider: BlockReader<Block = Block>>>(
|
||||
async fn remote_exex<Node: FullNodeComponents<Types: NodeTypes<Primitives = EthPrimitives>>>(
|
||||
mut ctx: ExExContext<Node>,
|
||||
notifications: Arc<broadcast::Sender<ExExNotification>>,
|
||||
) -> eyre::Result<()> {
|
||||
|
||||
@ -3,7 +3,7 @@ use remote_exex::proto::{
|
||||
self,
|
||||
remote_ex_ex_server::{RemoteExEx, RemoteExExServer},
|
||||
};
|
||||
use reth::{primitives::Block, providers::BlockReader};
|
||||
use reth::{builder::NodeTypes, primitives::EthPrimitives};
|
||||
use reth_exex::{ExExContext, ExExEvent, ExExNotification};
|
||||
use reth_node_api::FullNodeComponents;
|
||||
use reth_node_ethereum::EthereumNode;
|
||||
@ -47,7 +47,7 @@ impl RemoteExEx for ExExService {
|
||||
|
||||
// ANCHOR: snippet
|
||||
#[allow(dead_code)]
|
||||
async fn remote_exex<Node: FullNodeComponents<Provider: BlockReader<Block = Block>>>(
|
||||
async fn remote_exex<Node: FullNodeComponents<Types: NodeTypes<Primitives = EthPrimitives>>>(
|
||||
mut ctx: ExExContext<Node>,
|
||||
notifications: Arc<broadcast::Sender<ExExNotification>>,
|
||||
) -> eyre::Result<()> {
|
||||
|
||||
@ -5,7 +5,7 @@ use std::{
|
||||
};
|
||||
|
||||
use futures_util::{FutureExt, TryStreamExt};
|
||||
use reth::{api::FullNodeComponents, primitives::Block, providers::BlockReader};
|
||||
use reth::{api::FullNodeComponents, builder::NodeTypes, primitives::EthPrimitives};
|
||||
use reth_exex::{ExExContext, ExExEvent, ExExNotification};
|
||||
use reth_node_ethereum::EthereumNode;
|
||||
use reth_tracing::tracing::info;
|
||||
@ -14,7 +14,9 @@ struct MyExEx<Node: FullNodeComponents> {
|
||||
ctx: ExExContext<Node>,
|
||||
}
|
||||
|
||||
impl<Node: FullNodeComponents<Provider: BlockReader<Block = Block>>> Future for MyExEx<Node> {
|
||||
impl<Node: FullNodeComponents<Types: NodeTypes<Primitives = EthPrimitives>>> Future
|
||||
for MyExEx<Node>
|
||||
{
|
||||
type Output = eyre::Result<()>;
|
||||
|
||||
fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output> {
|
||||
|
||||
@ -6,7 +6,7 @@ use std::{
|
||||
|
||||
use alloy_primitives::BlockNumber;
|
||||
use futures_util::{FutureExt, TryStreamExt};
|
||||
use reth::{api::FullNodeComponents, primitives::Block, providers::BlockReader};
|
||||
use reth::{api::FullNodeComponents, builder::NodeTypes, primitives::EthPrimitives};
|
||||
use reth_exex::{ExExContext, ExExEvent};
|
||||
use reth_node_ethereum::EthereumNode;
|
||||
use reth_tracing::tracing::info;
|
||||
@ -25,7 +25,9 @@ impl<Node: FullNodeComponents> MyExEx<Node> {
|
||||
}
|
||||
}
|
||||
|
||||
impl<Node: FullNodeComponents<Provider: BlockReader<Block = Block>>> Future for MyExEx<Node> {
|
||||
impl<Node: FullNodeComponents<Types: NodeTypes<Primitives = EthPrimitives>>> Future
|
||||
for MyExEx<Node>
|
||||
{
|
||||
type Output = eyre::Result<()>;
|
||||
|
||||
fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output> {
|
||||
|
||||
Reference in New Issue
Block a user