Commit 52c76ab
Account for missing balance in channel reserve assertions for splices
When we create the post-splice `FundingScope`, the monotonicity debug
assertion trackers were initialized to the post-splice balance without
accounting for pending HTLCs or anchor costs. Since splices can have
in-flight HTLCs (unlike fresh channel opens), the first commitment
transaction's actual balance was lower than the initialized max, causing
the debug assertion in `ChannelContext::build_commitment_transaction` to
fire.
Note that we don't need to recompute the full post-splice balance here.
We can rely on the pre-splice `FundingScope`'s
`holder/counterparty_max_commitment_tx_output` instead since they're
already accounted for there.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent 153e57e commit 52c76ab
1 file changed
Lines changed: 14 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2847 | 2847 | | |
2848 | 2848 | | |
2849 | 2849 | | |
2850 | | - | |
2851 | | - | |
2852 | | - | |
2853 | | - | |
| 2850 | + | |
| 2851 | + | |
| 2852 | + | |
| 2853 | + | |
| 2854 | + | |
| 2855 | + | |
| 2856 | + | |
2854 | 2857 | | |
2855 | | - | |
2856 | | - | |
2857 | | - | |
2858 | | - | |
| 2858 | + | |
| 2859 | + | |
| 2860 | + | |
| 2861 | + | |
| 2862 | + | |
| 2863 | + | |
| 2864 | + | |
2859 | 2865 | | |
2860 | 2866 | | |
2861 | 2867 | | |
| |||
0 commit comments