forked from lightningdevkit/ldk-node
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Merge anchor support from tnull #11
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Our `stop_sender`/`stop_receiver` watch channel is used to signal to background tasks that they need to stop as we're about to shut down. Previously, we stored both sides in our `Node` object. However, when restarting the node, this would lead to us cloning a stale `stop_receiver`, i.e., one that still had the change signal set, messing with our shutdown logic on restarts. Here, we instead drop the stored receiver and just create all receivers by `subscribe`ing to the sender where necessary, which fixes the prior bug.
While we previously took care of persisting peer details when a channel is opened and if the user signals to `connect` to have the connection persisted, our background task would still only try to reconnect to channel peers. Here, we fix this omission and add a regression test ensuring we'll see the proper behavior going forward.
…connection Reconnect all persisted peers on restart
.. unfortunately the `windows-sys` dependency recently seems to have broken their doc builds on rustc 1.63.0. As tests and builds still work without issue, we fix CI by just not building docs on `windows-latest`/`1.63.0`
…-doc-build Fix CI by not building docs Windows on 1.63.0
The fee as returned from `PaymentSent` event generated by LDK and is saved in `PaymentSuccessful` event.
.. which will tell Rust not to treat it as an integration test module.
.. no need to use a `Result` here
.. we replace the simple `is_running` with a more verbose `status` method returning a `NodeStatus` struct, giving more information on syncing states etc.
…atus Introduce `status` method allowing to query the `Node`'s status
…-for-msrv Pin `reqwest` to fix MSRV builds in CI
.. switching to `dyn KVStore + Send + Sync`
... now that we don't have any generic to hide, we can just use the `Node` type directly.
.. now that we can.
.. just a minor cleanup to further modularize the codebase. Also, we'll be reusing these methods in `Event::ConnectionNeeded` soon.
.. we should consider dropping `Deref` and instead just commiting to store a `Arc<L>` everwhere, as it gets tedious to maintain. However, this is barely scraping by and the least invasive change here.
.. which is a bit more readable and in-line what we do other places, plus it allows us to drop the `futures` dependency.
... we check that we can successfully issue concurrent connection attempts, which all succeed.
Previously, concurrent calls to `do_connect_peer`/`connect_peer_if_necessary` could result in multiple connections being opened, just to be closed as redundant shortly after. Parallel connection attempt were therefore prone to fail. Here, we introduce a `ConnectionManager` that implements a pub/sub pattern: upon the initial call, the task responsible for polling the connection future to completion registers that a connection is in-flight. Any calls following will check this and register a `oneshot` channel to be notified of the `Result`.
.. which declutters our top-level docs a bit.
.. as we changed quite a bit and moved required fields, we add a test here that adds the old `PaymentDetails` as a test struct and ensures we're able to parse them just fine
.. allowing to configure the per-channel emergency reserve as well as some trusted peers for which we won't maintain any reserve.
When Anchor outputs need to be spent LDK will generate `BumpTransactionEvent`s. Here, we add the corresponding event-handling and PSBT-signing support.
.. because they will be the new default. Note the upcoming CLN 24.02 release will make Anchors default, too, but for now we have to set the `experimental-anchors` config option.
.. which we somehow so far ommitted exposing in the API. We now introduce a `force` flag to `close_channel` and broadcast if the counterparty is not trusted.
…merge-anchor-support-from-upstream # Conflicts: # .github/workflows/rust.yml # bindings/ldk_node.udl # src/event.rs # src/lib.rs # src/payment_store.rs # tests/common/mod.rs
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.