-
Notifications
You must be signed in to change notification settings - Fork 98
Update to 0.2.0-beta1 and minor tweaks #141
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
base: main
Are you sure you want to change the base?
Conversation
Naively update to LDK 0.2 using the sync wrappers to keep current behavior.
I've assigned @valentinewallace as a reviewer! |
CI sad |
Cause ldk 0.2 isn't uploaded yet :) |
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.
LGTM
// Trivially bridge the LDK FutureSpawner trait to tokio | ||
struct TokioSpawner; | ||
impl FutureSpawner for TokioSpawner{ | ||
fn spawn<T: Future<Output = ()> + Send + 'static>(&self, future: T) { | ||
tokio::spawn(future); | ||
} | ||
} |
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.
Will everyone need to do this / it should go in rust-lightning
?
let mut channelmonitors = persister.read_all_channel_monitors_with_updates().await.unwrap(); | ||
// If you are using the `FilesystemStore` as a `Persist` directly, use | ||
// `lightning::util::persist::read_channel_monitors` like this: | ||
//read_channel_monitors(Arc::clone(&persister), Arc::clone(&keys_manager), Arc::clone(&keys_manager)).unwrap(); |
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.
nit: need space after //
63307ce
to
6df8846
Compare
With LDK 0.2, most traits now offer async variants. In the previous commit we ignored these but here we migrate to them everywhere except in the `ChannelMonitor` persistence. Note that we have to switch to async stdin reading in cli.rs to ensure we always reach an `await` point in a timely manner on all tasks.
Now that we have `ChainMonitor::load_existing_monitor` we can use it during startup to avoid the excess persistence at startup.
Its always been a bit strange that we persist the addresses of our peers to disk when there's a public gossip db, its not really a thing most LN nodes do. It might be useful for private channels but there's not a lot of reason to have it in `ldk-sample`.
No description provided.