Skip to content

Conversation

TheBlueMatt
Copy link
Contributor

No description provided.

Naively update to LDK 0.2 using the sync wrappers to keep current
behavior.
@ldk-reviews-bot
Copy link

ldk-reviews-bot commented Sep 29, 2025

I've assigned @valentinewallace as a reviewer!
I'll wait for their review and will help manage the review process.
Once they submit their review, I'll check if a second reviewer would be helpful.

@valentinewallace
Copy link
Contributor

CI sad

@TheBlueMatt
Copy link
Contributor Author

Cause ldk 0.2 isn't uploaded yet :)

@TheBlueMatt TheBlueMatt changed the title Update to 0.2.0-beta1 Update to 0.2.0-beta1 and minor tweaks Sep 29, 2025
Copy link
Contributor

@valentinewallace valentinewallace left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Comment on lines +216 to +222
// 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);
}
}
Copy link
Contributor

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();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: need space after //

@TheBlueMatt TheBlueMatt force-pushed the main branch 2 times, most recently from 63307ce to 6df8846 Compare September 30, 2025 10:31
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`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants