mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-23 07:18:00 +00:00
Clone + Debug on Payloads/Addresses, and compare child storage results (#1203)
* Clone + Debug on Payloads/Addresses, and compare child storage results * , to . * clippy and fixes * fix * use derivative instead to remove boilerplate impls * add missing import * tidy up and extend wasm test timeout * try 5 mins instead of 2
This commit is contained in:
@@ -60,6 +60,46 @@ async fn storage_iter() {
|
||||
assert_eq!(len, 13);
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
async fn storage_child_values_same_across_backends() {
|
||||
let ctx = test_context().await;
|
||||
|
||||
let unstable_client = ctx.unstable_client().await;
|
||||
let legacy_client = ctx.legacy_client().await;
|
||||
|
||||
let addr = node_runtime::storage().system().account_iter();
|
||||
let block_ref = legacy_client
|
||||
.blocks()
|
||||
.at_latest()
|
||||
.await
|
||||
.unwrap()
|
||||
.reference();
|
||||
|
||||
let a: Vec<_> = unstable_client
|
||||
.storage()
|
||||
.at(block_ref.clone())
|
||||
.iter(addr.clone())
|
||||
.await
|
||||
.unwrap()
|
||||
.collect()
|
||||
.await;
|
||||
let b: Vec<_> = legacy_client
|
||||
.storage()
|
||||
.at(block_ref.clone())
|
||||
.iter(addr)
|
||||
.await
|
||||
.unwrap()
|
||||
.collect()
|
||||
.await;
|
||||
|
||||
for (a, b) in a.into_iter().zip(b.into_iter()) {
|
||||
let a = a.unwrap();
|
||||
let b = b.unwrap();
|
||||
|
||||
assert_eq!(a, b);
|
||||
}
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
async fn transaction_validation() {
|
||||
let ctx = test_context().await;
|
||||
|
||||
Reference in New Issue
Block a user