diff --git a/crates/rpc/rpc-testing-util/src/trace.rs b/crates/rpc/rpc-testing-util/src/trace.rs index 575383b66f4b..9b6133e6e4b2 100644 --- a/crates/rpc/rpc-testing-util/src/trace.rs +++ b/crates/rpc/rpc-testing-util/src/trace.rs @@ -361,6 +361,7 @@ mod tests { use super::*; use jsonrpsee::http_client::HttpClientBuilder; use reth_primitives::BlockNumberOrTag; + use reth_rpc_types::trace::filter::TraceFilterMode; use std::collections::HashSet; fn assert_is_stream(_: &St) {} @@ -459,4 +460,34 @@ mod tests { } } } + + #[tokio::test] + #[ignore] + async fn can_create_trace_filter() { + let client = HttpClientBuilder::default().build("http://localhost:8545").unwrap(); + + let filter = TraceFilter { + from_block: None, + to_block: None, + from_address: Vec::new(), + to_address: Vec::new(), + mode: TraceFilterMode::Union, + after: None, + count: None, + }; + + let filters = vec![filter]; + let mut stream = client.trace_filter_stream(filters); + + while let Some(result) = stream.next().await { + match result { + Ok(trace) => { + println!("Received trace: {:?}", trace); + } + Err(e) => { + println!("Error fetching trace: {:?}", e); + } + } + } + } }