feat: relax provider bounds (#12857)

This commit is contained in:
Arsenii Kulikov
2024-11-26 20:26:36 +04:00
committed by GitHub
parent d51b347c81
commit 2ce741709f
37 changed files with 365 additions and 236 deletions

View File

@ -1,11 +1,12 @@
use std::sync::Arc;
use alloy_eips::eip2718::Encodable2718;
use alloy_genesis::Genesis;
use alloy_primitives::{b256, hex};
use futures::StreamExt;
use reth::{args::DevArgs, rpc::api::eth::helpers::EthTransactions};
use reth_chainspec::ChainSpec;
use reth_node_api::FullNodeComponents;
use reth_node_api::{FullNodeComponents, FullNodePrimitives, NodeTypes};
use reth_node_builder::{
rpc::RethRpcAddOns, EngineNodeLauncher, FullNode, NodeBuilder, NodeConfig, NodeHandle,
};
@ -46,6 +47,7 @@ async fn assert_chain_advances<N, AddOns>(node: FullNode<N, AddOns>)
where
N: FullNodeComponents<Provider: CanonStateSubscriptions>,
AddOns: RethRpcAddOns<N, EthApi: EthTransactions>,
N::Types: NodeTypes<Primitives: FullNodePrimitives>,
{
let mut notifications = node.provider.canonical_state_stream();
@ -64,7 +66,7 @@ where
let head = notifications.next().await.unwrap();
let tx = &head.tip().transactions()[0];
assert_eq!(tx.hash(), hash);
assert_eq!(tx.trie_hash(), hash);
println!("mined transaction: {hash}");
}