-
Notifications
You must be signed in to change notification settings - Fork 23
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
Update to latest rust-dlc
#213
Conversation
7723d10
to
2701cb6
Compare
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
mobile/pubspec.lock
Outdated
@@ -1022,5 +1022,5 @@ packages: | |||
source: hosted | |||
version: "2.0.3" | |||
sdks: | |||
dart: ">=2.19.0 <4.0.0" | |||
dart: ">=2.19.0 <3.0.0" |
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.
🛠️ I don't think this change should be part of this PR. I keep running into this problem as well on my machine (somehow it is always changed back; but I think for @bonomat it is then changed back to 4.0.0 😅)
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.
I can remove it, but according to the pubspec.yaml
, this change is correct:
environment:
sdk: ">=2.17.5 <3.0.0"
If you play around with those constraints and you run flutter pub get
the pubspec.lock
changes as expected.
Most notably: - We now depend on the `split-tx-experiment` branch of `p2pderivatives/rust-lightning` fork. It appears that the changes we had in our fork are no longer needed and we need to update the dependency to be able to use the new branch of `rust-dlc`. - We've had to add our own `CustomSigner` and `CustomKeysManager` since `rust-dlc` no longer exports them. For now we have just inlined the implementations used in the `rust-dlc` tests.
We no longer need to patch the dependency after version 2.0 has been published.
This dependency should ideally only be known by core crates such as `ln-dlc-node`. We define a method `get_new_address` on `Node` so that we can control how we call the underlying on-chain wallet, rather than letting consumers call the wallet through a trait that is designed for a completely different purpose. We also turn the generic `get_dlcs` API into the more specific `get_confirmed_dlcs`, as this is the only thing that is currently needed. This way we can avoid consumers needing to understand types defined by `rust-dlc`. The `get_confirmed_dlcs` API and the matching `Dlc` type should evolve (and perhaps even disappear) as we meet new requirements.
2701cb6
to
09d9710
Compare
bors r+ |
Build succeeded: |
The new
rust-dlc
branch is still WIP, but it's good to keep this dependency up-to-date as much as possible.