Skip to content

Commit

Permalink
Bump futures from 0.3.7 to 0.3.8 (paritytech#507)
Browse files Browse the repository at this point in the history
* Bump futures from 0.3.7 to 0.3.8

Bumps [futures](https://github.com/rust-lang/futures-rs) from 0.3.7 to 0.3.8.
- [Release notes](https://github.com/rust-lang/futures-rs/releases)
- [Changelog](https://github.com/rust-lang/futures-rs/blob/master/CHANGELOG.md)
- [Commits](rust-lang/futures-rs@0.3.7...0.3.8)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

* Fix clippy.

* Fix more clippy.

* Fix clippy again?

* Cliipy yet again.

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: Tomasz Drwięga <tomasz@parity.io>
  • Loading branch information
2 people authored and serban300 committed Apr 9, 2024
1 parent 15324ea commit 2fa40a8
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 19 deletions.
2 changes: 1 addition & 1 deletion bridges/relays/ethereum/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ env_logger = "0.8.2"
ethabi = "12.0"
ethabi-contract = "11.0"
ethabi-derive = "12.0"
futures = "0.3.7"
futures = "0.3.8"
hex = "0.4"
hex-literal = "0.3"
log = "0.4.11"
Expand Down
23 changes: 12 additions & 11 deletions bridges/relays/headers-relay/src/sync_loop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ pub fn run<P: HeadersSyncPipeline, TC: TargetClient<P>>(
metrics_params: Option<MetricsParams>,
exit_signal: impl Future<Output = ()>,
) {
#![allow(unused_variables)] // this is to suppress weird errors from clippy
let mut local_pool = futures::executor::LocalPool::new();
let mut progress_context = (Instant::now(), None, None);

Expand Down Expand Up @@ -203,7 +204,7 @@ pub fn run<P: HeadersSyncPipeline, TC: TargetClient<P>>(
&mut source_retry_backoff,
|source_best_block_number| sync.source_best_header_number_response(source_best_block_number),
&mut source_go_offline_future,
|delay| async_std::task::sleep(delay),
async_std::task::sleep,
|| format!("Error retrieving best header number from {}", P::SOURCE_NAME),
).is_ok();
},
Expand All @@ -213,7 +214,7 @@ pub fn run<P: HeadersSyncPipeline, TC: TargetClient<P>>(
&mut source_retry_backoff,
|source_new_header| sync.headers_mut().header_response(source_new_header),
&mut source_go_offline_future,
|delay| async_std::task::sleep(delay),
async_std::task::sleep,
|| format!("Error retrieving header from {} node", P::SOURCE_NAME),
).is_ok();
},
Expand All @@ -223,7 +224,7 @@ pub fn run<P: HeadersSyncPipeline, TC: TargetClient<P>>(
&mut source_retry_backoff,
|source_orphan_header| sync.headers_mut().header_response(source_orphan_header),
&mut source_go_offline_future,
|delay| async_std::task::sleep(delay),
async_std::task::sleep,
|| format!("Error retrieving orphan header from {} node", P::SOURCE_NAME),
).is_ok();
},
Expand All @@ -233,7 +234,7 @@ pub fn run<P: HeadersSyncPipeline, TC: TargetClient<P>>(
&mut source_retry_backoff,
|(header, extra)| sync.headers_mut().extra_response(&header, extra),
&mut source_go_offline_future,
|delay| async_std::task::sleep(delay),
async_std::task::sleep,
|| format!("Error retrieving extra data from {} node", P::SOURCE_NAME),
).is_ok();
},
Expand All @@ -243,7 +244,7 @@ pub fn run<P: HeadersSyncPipeline, TC: TargetClient<P>>(
&mut source_retry_backoff,
|(header, completion)| sync.headers_mut().completion_response(&header, completion),
&mut source_go_offline_future,
|delay| async_std::task::sleep(delay),
async_std::task::sleep,
|| format!("Error retrieving completion data from {} node", P::SOURCE_NAME),
).is_ok();
},
Expand Down Expand Up @@ -294,7 +295,7 @@ pub fn run<P: HeadersSyncPipeline, TC: TargetClient<P>>(
}
},
&mut target_go_offline_future,
|delay| async_std::task::sleep(delay),
async_std::task::sleep,
|| format!("Error retrieving best known {} header from {} node", P::SOURCE_NAME, P::TARGET_NAME),
).is_ok();
},
Expand All @@ -306,7 +307,7 @@ pub fn run<P: HeadersSyncPipeline, TC: TargetClient<P>>(
&mut target_retry_backoff,
|incomplete_headers_ids| sync.headers_mut().incomplete_headers_response(incomplete_headers_ids),
&mut target_go_offline_future,
|delay| async_std::task::sleep(delay),
async_std::task::sleep,
|| format!("Error retrieving incomplete headers from {} node", P::TARGET_NAME),
).is_ok();
},
Expand All @@ -318,7 +319,7 @@ pub fn run<P: HeadersSyncPipeline, TC: TargetClient<P>>(
.headers_mut()
.maybe_orphan_response(&target_header, target_existence_status),
&mut target_go_offline_future,
|delay| async_std::task::sleep(delay),
async_std::task::sleep,
|| format!("Error retrieving existence status from {} node", P::TARGET_NAME),
).is_ok();
},
Expand Down Expand Up @@ -346,7 +347,7 @@ pub fn run<P: HeadersSyncPipeline, TC: TargetClient<P>>(
&mut target_retry_backoff,
|_| {},
&mut target_go_offline_future,
|delay| async_std::task::sleep(delay),
async_std::task::sleep,
|| format!("Error submitting headers to {} node", P::TARGET_NAME),
).is_ok();

Expand All @@ -367,7 +368,7 @@ pub fn run<P: HeadersSyncPipeline, TC: TargetClient<P>>(
&mut target_retry_backoff,
|completed_header| sync.headers_mut().header_completed(&completed_header),
&mut target_go_offline_future,
|delay| async_std::task::sleep(delay),
async_std::task::sleep,
|| format!("Error completing headers at {}", P::TARGET_NAME),
).is_ok();
},
Expand All @@ -379,7 +380,7 @@ pub fn run<P: HeadersSyncPipeline, TC: TargetClient<P>>(
.headers_mut()
.maybe_extra_response(&header, extra_check_result),
&mut target_go_offline_future,
|delay| async_std::task::sleep(delay),
async_std::task::sleep,
|| format!("Error retrieving receipts requirement from {} node", P::TARGET_NAME),
).is_ok();
},
Expand Down
4 changes: 2 additions & 2 deletions bridges/relays/messages-relay/src/message_lane_loop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ async fn run_until_connection_lost<P: MessageLane, SC: SourceClient<P>, TC: Targ
}
},
&mut source_go_offline_future,
|delay| async_std::task::sleep(delay),
async_std::task::sleep,
|| format!("Error retrieving state from {} node", P::SOURCE_NAME),
).fail_if_connection_error(FailedClient::Source)?;
},
Expand Down Expand Up @@ -405,7 +405,7 @@ async fn run_until_connection_lost<P: MessageLane, SC: SourceClient<P>, TC: Targ
}
},
&mut target_go_offline_future,
|delay| async_std::task::sleep(delay),
async_std::task::sleep,
|| format!("Error retrieving state from {} node", P::TARGET_NAME),
).fail_if_connection_error(FailedClient::Target)?;
},
Expand Down
8 changes: 4 additions & 4 deletions bridges/relays/messages-relay/src/message_race_loop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ pub async fn run<P: MessageRace, SC: SourceClient<P>>(
strategy.source_nonces_updated(at_block, nonces);
},
&mut source_go_offline_future,
|delay| async_std::task::sleep(delay),
async_std::task::sleep,
|| format!("Error retrieving nonces from {}", P::source_name()),
).fail_if_connection_error(FailedClient::Source)?;
},
Expand All @@ -290,7 +290,7 @@ pub async fn run<P: MessageRace, SC: SourceClient<P>>(
strategy.target_nonces_updated(nonces, &mut race_state);
},
&mut target_go_offline_future,
|delay| async_std::task::sleep(delay),
async_std::task::sleep,
|| format!("Error retrieving nonces from {}", P::target_name()),
).fail_if_connection_error(FailedClient::Target)?;
},
Expand All @@ -311,7 +311,7 @@ pub async fn run<P: MessageRace, SC: SourceClient<P>>(
race_state.nonces_to_submit = Some((at_block, nonces_range, proof));
},
&mut source_go_offline_future,
|delay| async_std::task::sleep(delay),
async_std::task::sleep,
|| format!("Error generating proof at {}", P::source_name()),
).fail_if_connection_error(FailedClient::Source)?;
},
Expand All @@ -331,7 +331,7 @@ pub async fn run<P: MessageRace, SC: SourceClient<P>>(
race_state.nonces_submitted = Some(nonces_range);
},
&mut target_go_offline_future,
|delay| async_std::task::sleep(delay),
async_std::task::sleep,
|| format!("Error submitting proof {}", P::target_name()),
).fail_if_connection_error(FailedClient::Target)?;
}
Expand Down
2 changes: 1 addition & 1 deletion bridges/relays/substrate/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ license = "GPL-3.0-or-later WITH Classpath-exception-2.0"
async-std = "1.7.0"
async-trait = "0.1.42"
codec = { package = "parity-scale-codec", version = "1.3.4" }
futures = "0.3.7"
futures = "0.3.8"
hex = "0.4"
log = "0.4.11"
num-traits = "0.2"
Expand Down

0 comments on commit 2fa40a8

Please sign in to comment.