Commit f945ade
committed
Fix balance candidate selection during pending splices
Mirror LDK's sentinel logic for confirmed_balance_candidate_index in
ClaimableOnChannelClose: when the index is 0 (no specific alternative
funding confirmed), use the last balance candidate (most current
splice/RBF attempt) instead of the first. This aligns with LDK's
claimable_amount_satoshis() behavior and fixes a mismatch where
total_lightning_balance_sats could differ from the sum of individual
LightningBalance amounts during pending splices.
AI tools were used in preparing this commit.1 parent ca5e79c commit f945ade
1 file changed
+10
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
231 | 231 | | |
232 | 232 | | |
233 | 233 | | |
234 | | - | |
235 | | - | |
236 | | - | |
237 | | - | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
238 | 244 | | |
239 | 245 | | |
240 | 246 | | |
| |||
0 commit comments