feat(rpc-testing-util): support test block for trace get (#5272)

This commit is contained in:
DoTheBestToGetTheBest
2023-11-03 04:46:03 -07:00
committed by GitHub
parent 9fc0e7637f
commit 38eb1ee2ed

View File

@ -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);
}
}
}
}
}