Fix CLI storage diff (#1958)

* Fix CLI storage diff

* attempt to avoid race in tests
This commit is contained in:
James Wilson
2025-03-12 15:51:39 +00:00
committed by GitHub
parent 20bc4b89ca
commit af59a9960b
2 changed files with 4 additions and 2 deletions
+1 -1
View File
@@ -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"))
}