Commit 9deda08
Splice and open channels with all on-chain funds
Use ldk-node's new splice_in_with_all and open_channel_with_all
APIs, which compute the maximum drain amount net of fees and
anchor reserves. This replaces the hand-rolled fee subtraction
on splice and the hardcoded fee constant on channel open.
Drop the amt parameter from the LightningWallet trait's
open_channel_with_lsp and splice_to_lsp_channel methods. Every
implementation discarded it; the signature now matches the
contract.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 4cf5efb commit 9deda08
2 files changed
Lines changed: 17 additions & 48 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
113 | | - | |
| 113 | + | |
| 114 | + | |
114 | 115 | | |
115 | | - | |
| 116 | + | |
116 | 117 | | |
117 | 118 | | |
118 | 119 | | |
119 | 120 | | |
120 | 121 | | |
121 | 122 | | |
122 | 123 | | |
123 | | - | |
| 124 | + | |
| 125 | + | |
124 | 126 | | |
125 | | - | |
| 127 | + | |
126 | 128 | | |
127 | 129 | | |
128 | 130 | | |
| |||
344 | 346 | | |
345 | 347 | | |
346 | 348 | | |
347 | | - | |
| 349 | + | |
348 | 350 | | |
349 | 351 | | |
350 | 352 | | |
| |||
362 | 364 | | |
363 | 365 | | |
364 | 366 | | |
365 | | - | |
| 367 | + | |
366 | 368 | | |
367 | 369 | | |
368 | 370 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
403 | 403 | | |
404 | 404 | | |
405 | 405 | | |
406 | | - | |
407 | | - | |
408 | | - | |
| 406 | + | |
409 | 407 | | |
410 | 408 | | |
411 | 409 | | |
412 | 410 | | |
413 | 411 | | |
414 | 412 | | |
415 | | - | |
416 | | - | |
417 | | - | |
418 | | - | |
419 | | - | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
420 | 416 | | |
421 | 417 | | |
422 | 418 | | |
| |||
427 | 423 | | |
428 | 424 | | |
429 | 425 | | |
430 | | - | |
431 | | - | |
432 | | - | |
433 | | - | |
434 | | - | |
435 | | - | |
436 | | - | |
437 | | - | |
438 | | - | |
439 | | - | |
440 | | - | |
441 | | - | |
442 | | - | |
443 | | - | |
| 426 | + | |
444 | 427 | | |
445 | 428 | | |
446 | | - | |
447 | 429 | | |
448 | 430 | | |
449 | 431 | | |
| |||
544 | 526 | | |
545 | 527 | | |
546 | 528 | | |
547 | | - | |
| 529 | + | |
548 | 530 | | |
549 | | - | |
550 | | - | |
551 | | - | |
552 | | - | |
| 531 | + | |
553 | 532 | | |
554 | 533 | | |
555 | 534 | | |
| |||
573 | 552 | | |
574 | 553 | | |
575 | 554 | | |
576 | | - | |
| 555 | + | |
577 | 556 | | |
578 | | - | |
579 | | - | |
580 | | - | |
581 | | - | |
582 | | - | |
583 | | - | |
584 | | - | |
585 | | - | |
586 | | - | |
587 | | - | |
588 | | - | |
589 | | - | |
590 | | - | |
| 557 | + | |
591 | 558 | | |
592 | 559 | | |
593 | 560 | | |
| |||
0 commit comments