feat(network): implement stake snapshot local state query (#394)

This commit is contained in:
Alexsander Falcucci 2024-02-06 13:17:44 +01:00 committed by GitHub
parent 3a0514c92b
commit 43cdb74ee0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 165 additions and 6 deletions

View file

@ -54,6 +54,14 @@ async fn do_localstate_query(client: &mut NodeClient) {
let result = queries_v16::get_current_pparams(client, era).await.unwrap();
println!("result: {:?}", result);
// Stake pool ID/verification key hash (either Bech32-decoded or hex-decoded).
// Empty Vec means all pools.
let pools = vec![];
let result = queries_v16::get_stake_snapshots(client, era, pools)
.await
.unwrap();
println!("result: {:?}", result);
client.send_release().await.unwrap();
}