diff --git a/substrate/test-utils/client/src/lib.rs b/substrate/test-utils/client/src/lib.rs index fc9ba1c9e0dd9b2bdc0332bfdff35e7083fbd1b9..94006fd9acb8e9ae1f808ea66c00932400adb8de 100644 --- a/substrate/test-utils/client/src/lib.rs +++ b/substrate/test-utils/client/src/lib.rs @@ -42,7 +42,11 @@ use sc_client_api::BlockchainEvents; use sc_service::client::{ClientConfig, LocalCallExecutor}; use serde::Deserialize; use sp_core::{storage::ChildInfo, testing::TaskExecutor}; -use sp_runtime::{codec::Encode, traits::Block as BlockT, OpaqueExtrinsic}; +use sp_runtime::{ + codec::Encode, + traits::{Block as BlockT, Header}, + OpaqueExtrinsic, +}; use std::{ collections::{HashMap, HashSet}, pin::Pin, @@ -410,7 +414,7 @@ where Box::pin(async move { while let Some(notification) = import_notification_stream.next().await { if notification.is_new_best { - blocks.insert(notification.hash); + blocks.insert(*notification.header.number()); if blocks.len() == count { break }