From 4716157562ac9b028d741287f3ab16a70f3c8898 Mon Sep 17 00:00:00 2001 From: DoTheBestToGetTheBest <146037313+DoTheBestToGetTheBest@users.noreply.github.com> Date: Thu, 2 Nov 2023 09:39:28 -0700 Subject: [PATCH] Update trace.rs --- crates/rpc/rpc-testing-util/src/trace.rs | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/crates/rpc/rpc-testing-util/src/trace.rs b/crates/rpc/rpc-testing-util/src/trace.rs index fe3434ad687b..5d9eeda55fad 100644 --- a/crates/rpc/rpc-testing-util/src/trace.rs +++ b/crates/rpc/rpc-testing-util/src/trace.rs @@ -389,4 +389,26 @@ mod tests { } } } + #[tokio::test] + #[ignore] + async fn can_create_trace_get_stream() { + let client = HttpClientBuilder::default().build("http://localhost:8545").unwrap(); + + let tx_hash: B256 = "".parse().unwrap(); + + let indices: Vec = vec![Index::from(0)]; + + let mut stream = client.trace_get_stream(tx_hash, indices); + + while let Some(result) = stream.next().await { + match result { + Ok(trace) => { + println!("Received trace: {:?}", trace); + } + Err(e) => { + println!("Error fetching trace: {:?}", e); + } + } + } + } }