Commit 6f08168
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 50ed4a8 commit 6f08168
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 | |
|---|---|---|---|
| |||
400 | 400 | | |
401 | 401 | | |
402 | 402 | | |
403 | | - | |
404 | | - | |
405 | | - | |
| 403 | + | |
406 | 404 | | |
407 | 405 | | |
408 | 406 | | |
409 | 407 | | |
410 | 408 | | |
411 | 409 | | |
412 | | - | |
413 | | - | |
414 | | - | |
415 | | - | |
416 | | - | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
417 | 413 | | |
418 | 414 | | |
419 | 415 | | |
| |||
424 | 420 | | |
425 | 421 | | |
426 | 422 | | |
427 | | - | |
428 | | - | |
429 | | - | |
430 | | - | |
431 | | - | |
432 | | - | |
433 | | - | |
434 | | - | |
435 | | - | |
436 | | - | |
437 | | - | |
438 | | - | |
439 | | - | |
440 | | - | |
| 423 | + | |
441 | 424 | | |
442 | 425 | | |
443 | | - | |
444 | 426 | | |
445 | 427 | | |
446 | 428 | | |
| |||
541 | 523 | | |
542 | 524 | | |
543 | 525 | | |
544 | | - | |
| 526 | + | |
545 | 527 | | |
546 | | - | |
547 | | - | |
548 | | - | |
549 | | - | |
| 528 | + | |
550 | 529 | | |
551 | 530 | | |
552 | 531 | | |
| |||
570 | 549 | | |
571 | 550 | | |
572 | 551 | | |
573 | | - | |
| 552 | + | |
574 | 553 | | |
575 | | - | |
576 | | - | |
577 | | - | |
578 | | - | |
579 | | - | |
580 | | - | |
581 | | - | |
582 | | - | |
583 | | - | |
584 | | - | |
585 | | - | |
586 | | - | |
587 | | - | |
| 554 | + | |
588 | 555 | | |
589 | 556 | | |
590 | 557 | | |
| |||
0 commit comments