Skip to content

Commit

Permalink
feat(rpc-testing-util): support test block for trace get (#5272)
Browse files Browse the repository at this point in the history
  • Loading branch information
DoTheBestToGetTheBest authored Nov 3, 2023
1 parent 9fc0e76 commit 38eb1ee
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions crates/rpc/rpc-testing-util/src/trace.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<Index> = 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);
}
}
}
}
}

0 comments on commit 38eb1ee

Please sign in to comment.