feat: implement GetCBOR local state query (#413)
This commit is contained in:
parent
94b37fd798
commit
655efad6c2
3 changed files with 22 additions and 2 deletions
|
|
@ -68,6 +68,13 @@ async fn do_localstate_query(client: &mut NodeClient) {
|
|||
let result = queries_v16::get_genesis_config(client, era).await.unwrap();
|
||||
println!("result: {:?}", result);
|
||||
|
||||
// Ensure decoding across version disparities by always receiving a valid
|
||||
// response using the wrap function for the query result with CBOR-in-CBOR
|
||||
// concept.
|
||||
let query = queries_v16::BlockQuery::GetCurrentPParams;
|
||||
let result = queries_v16::get_cbor(client, era, query).await.unwrap();
|
||||
println!("result: {:?}", result);
|
||||
|
||||
client.send_release().await.unwrap();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue