Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

[Companion] Metadata delete on dissolve_pool #5955

Merged
merged 6 commits into from
Sep 6, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
merge
  • Loading branch information
ruseinov committed Sep 6, 2022
commit 744da0e77011de2dd1b4c3179177ae37ba08480d
9 changes: 7 additions & 2 deletions tests/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
// along with Substrate. If not, see <http://www.gnu.org/licenses/>.

use polkadot_core_primitives::Block;
use remote_externalities::rpc_api::get_finalized_head;
use remote_externalities::rpc_api::RpcService;
use std::{
io::{BufRead, BufReader, Read},
process::{Child, ExitStatus},
Expand Down Expand Up @@ -56,7 +56,12 @@ async fn wait_n_finalized_blocks_from(n: usize, url: &str) {
let mut interval = tokio::time::interval(Duration::from_secs(6));

loop {
if let Ok(block) = get_finalized_head::<Block, _>(url).await {
let rpc_service = match RpcService::new(url, false).await {
Ok(rpc_service) => rpc_service,
Err(_) => continue,
};

if let Ok(block) = rpc_service.get_finalized_head::<Block>().await {
built_blocks.insert(block);
if built_blocks.len() > n {
break
Expand Down