mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
feat(rpc-testing-util): support test block for trace get (#5272)
This commit is contained in:
committed by
GitHub
parent
9fc0e7637f
commit
38eb1ee2ed
@ -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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user