mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-22 04:28:00 +00:00
Fix CLI storage diff (#1958)
* Fix CLI storage diff * attempt to avoid race in tests
This commit is contained in:
@@ -230,7 +230,7 @@ impl StorageEntryDiff {
|
||||
.type_hash(value_1_ty_id)
|
||||
.expect("type is in metadata; qed");
|
||||
let value_2_ty_id = storage_entry_2.entry_type().value_ty();
|
||||
let value_2_hash = metadata_1
|
||||
let value_2_hash = metadata_2
|
||||
.type_hash(value_2_ty_id)
|
||||
.expect("type is in metadata; qed");
|
||||
let value_different = value_1_hash != value_2_hash;
|
||||
|
||||
@@ -10,7 +10,8 @@ use crate::{
|
||||
utils::{node_runtime, TestNodeProcess},
|
||||
};
|
||||
use codec::Encode;
|
||||
use futures::{Stream, StreamExt};
|
||||
use futures::{stream, Stream, StreamExt};
|
||||
use std::task::Poll;
|
||||
use subxt::{
|
||||
blocks::Block,
|
||||
client::OnlineClient,
|
||||
@@ -33,6 +34,7 @@ async fn fetch_finalized_blocks<T: Config>(
|
||||
.subscribe_finalized()
|
||||
.await
|
||||
.expect("issue subscribing to finalized in fetch_finalized_blocks")
|
||||
.skip(1) // <- skip first block incase next is close to being ready already.
|
||||
.take(n)
|
||||
.map(|r| r.expect("issue fetching block in fetch_finalized_blocks"))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user