Skip to content

Commit af59a99

Browse files
authored
Fix CLI storage diff (#1958)
* Fix CLI storage diff * attempt to avoid race in tests
1 parent 20bc4b8 commit af59a99

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

cli/src/commands/diff.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ impl StorageEntryDiff {
230230
.type_hash(value_1_ty_id)
231231
.expect("type is in metadata; qed");
232232
let value_2_ty_id = storage_entry_2.entry_type().value_ty();
233-
let value_2_hash = metadata_1
233+
let value_2_hash = metadata_2
234234
.type_hash(value_2_ty_id)
235235
.expect("type is in metadata; qed");
236236
let value_different = value_1_hash != value_2_hash;

testing/integration-tests/src/full_client/client/archive_rpcs.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ use crate::{
1010
utils::{node_runtime, TestNodeProcess},
1111
};
1212
use codec::Encode;
13-
use futures::{Stream, StreamExt};
13+
use futures::{stream, Stream, StreamExt};
14+
use std::task::Poll;
1415
use subxt::{
1516
blocks::Block,
1617
client::OnlineClient,
@@ -33,6 +34,7 @@ async fn fetch_finalized_blocks<T: Config>(
3334
.subscribe_finalized()
3435
.await
3536
.expect("issue subscribing to finalized in fetch_finalized_blocks")
37+
.skip(1) // <- skip first block incase next is close to being ready already.
3638
.take(n)
3739
.map(|r| r.expect("issue fetching block in fetch_finalized_blocks"))
3840
}

0 commit comments

Comments
 (0)