-
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
Do not overpay funding transaction fees by 2x #2032
Conversation
3348fd7
to
7c66640
Compare
Arc<Node<TenTenOneInMemoryStorage, InMemoryStore>>, | ||
#[tokio::test(flavor = "multi_thread")] | ||
#[ignore] | ||
async fn can_open_channel_with_min_inputs() { |
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.
We should move this test to rust-dlc
eventually, but our tests are easier to write for me.
let expected_fund_tx_fee = 252 * fee_rate_sats_per_vbyte; | ||
|
||
// This also depends on the fee rate, but the formula is a bit more involved. | ||
let fee_reserve = 880; |
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 work on using constants defined by rust-dlc
, to make all this clearer and less flaky on rust-dlc
upgrades. But I think this suffices for now.
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.
Very nice 👍
I think that deserves a CHANGELOG entry ;)
Once the funding transaction is constructed, `rust-dlc` allocates more fees than are needed to pay for the funding transaction.
7c66640
to
293bf4c
Compare
Fixes #2022.
3348fd7 adds 3 patches to our
rust-dlc
branch1:Only the last one is relevant for this PR, but the other ones are probably good too.
Footnotes
Atm the changes live in a separate branch: https://github.com/p2pderivatives/rust-dlc/commits/feature/ln-dlc-channels-10101-with-sign-psbt-fee-fix/. ↩