-
Notifications
You must be signed in to change notification settings - Fork 411
Fix background-processor
doc build for futures
#1744
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,7 +35,7 @@ use std::time::{Duration, Instant}; | |
use std::ops::Deref; | ||
|
||
#[cfg(feature = "futures")] | ||
use futures::{select, future::FutureExt}; | ||
use futures_util::{select_biased, future::FutureExt}; | ||
|
||
/// `BackgroundProcessor` takes care of tasks that (1) need to happen periodically to keep | ||
/// Rust-Lightning running properly, and (2) either can or should be run in the background. Its | ||
|
@@ -378,14 +378,15 @@ pub async fn process_events_async< | |
Descriptor: 'static + SocketDescriptor + Send + Sync, | ||
CMH: 'static + Deref + Send + Sync, | ||
RMH: 'static + Deref + Send + Sync, | ||
OMH: 'static + Deref + Send + Sync, | ||
EH: 'static + EventHandler + Send, | ||
PS: 'static + Deref + Send, | ||
M: 'static + Deref<Target = ChainMonitor<Signer, CF, T, F, L, P>> + Send + Sync, | ||
CM: 'static + Deref<Target = ChannelManager<Signer, CW, T, K, F, L>> + Send + Sync, | ||
PGS: 'static + Deref<Target = P2PGossipSync<G, CA, L>> + Send + Sync, | ||
RGS: 'static + Deref<Target = RapidGossipSync<G, L>> + Send, | ||
UMH: 'static + Deref + Send + Sync, | ||
PM: 'static + Deref<Target = PeerManager<Descriptor, CMH, RMH, L, UMH>> + Send + Sync, | ||
PM: 'static + Deref<Target = PeerManager<Descriptor, CMH, RMH, OMH, L, UMH>> + Send + Sync, | ||
S: 'static + Deref<Target = SC> + Send + Sync, | ||
SC: WriteableScore<'a>, | ||
SleepFuture: core::future::Future<Output = bool>, | ||
|
@@ -405,14 +406,15 @@ where | |
L::Target: 'static + Logger, | ||
P::Target: 'static + Persist<Signer>, | ||
CMH::Target: 'static + ChannelMessageHandler, | ||
OMH::Target: 'static + OnionMessageHandler, | ||
RMH::Target: 'static + RoutingMessageHandler, | ||
UMH::Target: 'static + CustomMessageHandler, | ||
PS::Target: 'static + Persister<'a, Signer, CW, T, K, F, L, SC>, | ||
{ | ||
let mut should_continue = true; | ||
define_run_body!(persister, event_handler, chain_monitor, channel_manager, | ||
gossip_sync, peer_manager, logger, scorer, should_continue, { | ||
select! { | ||
select_biased! { | ||
Comment on lines
-415
to
+417
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Would be good to have the reason for this change in the commit message or in a separate commit if unrelated. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Added more context in commit message with 0038a3f. Let me know if it is sufficient. |
||
_ = channel_manager.get_persistable_update_future().fuse() => true, | ||
cont = sleeper(Duration::from_millis(100)).fuse() => { | ||
should_continue = cont; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not test on MSRV? In fact, why not test on all builds?
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I wasn't sure whether we wanted to give it that much resources. Now building on all platforms/toolchains with 1a55192.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yikes, this just got a bit more relevant, since it fails to build under MSRV. To quote the
futures
repo README: "The current futures requires Rust 1.45 or later."So 0.0.111 had an effective MSRV of 1.45 it seems ...
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now 'solved' by pinning the
futures
crates' versions to the last one with MSRV 1.41 (c367f71). Let me know if that's acceptable, or if we're okay with an MSRV of 1.45.2 for thelightning-background-processor
crate.I'm however unsure why
macos-latest
andwindows-latest
stable targets are hanging with "Waiting for status to be reported". Any ideas?