Skip to content

Conversation

tnull
Copy link
Collaborator

@tnull tnull commented Oct 17, 2025

As we're looking to move to a more async-friendly API over time (which would allow us to drop the dependency on the KVStoreSync implementation entirely), we here make a few prefactors and minor improvements that move in that direction.

Most notably, we switch to have our tests run in async contexts, which also should make them more efficient as not every node will spawn its own runtime, but rather reuse the one runtime spawned for each test case.

tnull added 3 commits October 17, 2025 12:59
.. as we're about to `cargo test` anyways.
.. some of the `ReadFailed` cases didn't log why they failed. Here we
fix that oversight.
Given we regularly run into issues arising from mixing sync and async
contexts, we here simplify our `EventQueue` implementation by avoiding
to use `Condvar::wait_while` (which parks the current thread) and rather
simply us `block_on` on our `next_event_async` method.
@tnull tnull requested a review from joostjager October 17, 2025 11:08
@ldk-reviews-bot
Copy link

ldk-reviews-bot commented Oct 17, 2025

👋 Thanks for assigning @joostjager 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.

@tnull tnull force-pushed the 2025-10-asyncify-more-things branch 2 times, most recently from 187d5b7 to f817f78 Compare October 17, 2025 11:15
.. as LDK Node is moving towards a more `async` core, it starts to make
sense to switch our test suite over to be `async`.

This change should make our CI more efficient (as not every node will
spawn its independent runtime, but we just have one runtime per test
created) and also makes sure we won't run into any edge cases arising
from blocking test threads that are executing other async tasks.
@tnull tnull force-pushed the 2025-10-asyncify-more-things branch from f817f78 to 141f186 Compare October 17, 2025 11:21
@ldk-reviews-bot
Copy link

🔔 1st Reminder

Hey @joostjager! This PR has been waiting for your review.
Please take a look when you have a chance. If you're unable to review, please let us know so we can find another reviewer.

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.

2 participants