Skip to content

Commit

Permalink
fix nits
Browse files Browse the repository at this point in the history
  • Loading branch information
niklasad1 committed Sep 24, 2024
1 parent ed212d4 commit ae19fa0
Showing 1 changed file with 20 additions and 20 deletions.
40 changes: 20 additions & 20 deletions testing/integration-tests/src/full_client/client/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -424,27 +424,27 @@ async fn legacy_and_unstable_block_subscription_reconnect() {

consume_initial_blocks(&mut sub).await;

(
// Ignore `disconnected events`.
// This will be emitted by the legacy backend for every reconnection.
sub.filter(|item| {
let disconnected = match item {
Ok(_) => false,
Err(e) => {
if matches!(e, Error::Rpc(subxt::error::RpcError::DisconnectedWillReconnect(e)) if e.contains("Missed at least one block when the connection was lost")) {
missed_blocks = true;
}
e.is_disconnected_will_reconnect()
let blocks =
// Ignore `disconnected events`.
// This will be emitted by the legacy backend for every reconnection.
sub.filter(|item| {
let disconnected = match item {
Ok(_) => false,
Err(e) => {
if matches!(e, Error::Rpc(subxt::error::RpcError::DisconnectedWillReconnect(e)) if e.contains("Missed at least one block when the connection was lost")) {
missed_blocks = true;
}
};

futures::future::ready(!disconnected)
})
.take(num)
.map(|x| x.unwrap().hash().to_string())
.collect::<Vec<String>>()
.await, missed_blocks
)
e.is_disconnected_will_reconnect()
}
};

futures::future::ready(!disconnected)
})
.take(num)
.map(|x| x.unwrap().hash().to_string())
.collect::<Vec<String>>().await;

(blocks, missed_blocks)
}
};

Expand Down

0 comments on commit ae19fa0

Please sign in to comment.