Commit 048e3e1
chanmon_consistency: verify claimable balances after settlement
After the 0xff settlement completes with force-closed channels, check
get_claimable_balances() on all chain monitors. Assert that no
ClaimableOnChannelClose balances remain, since those indicate the
monitor still considers a channel open when it should be closed. This
catches state machine bugs where the force-close state transition is
not properly reflected in balance tracking.
Other balance types (ClaimableAwaitingConfirmations,
MaybeTimeoutClaimableHTLC, etc.) are logged but not asserted empty,
since anchor channel HTLC resolution is not yet fully handled (the
BumpTransaction events are currently dropped).
The check passes open channels via the ignored_channels parameter so
that only closed channel balances are examined.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent d21a356 commit 048e3e1
1 file changed
Lines changed: 38 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
| 44 | + | |
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| |||
2989 | 2989 | | |
2990 | 2990 | | |
2991 | 2991 | | |
| 2992 | + | |
| 2993 | + | |
| 2994 | + | |
| 2995 | + | |
| 2996 | + | |
| 2997 | + | |
| 2998 | + | |
| 2999 | + | |
| 3000 | + | |
| 3001 | + | |
| 3002 | + | |
| 3003 | + | |
| 3004 | + | |
| 3005 | + | |
| 3006 | + | |
| 3007 | + | |
| 3008 | + | |
| 3009 | + | |
| 3010 | + | |
| 3011 | + | |
| 3012 | + | |
| 3013 | + | |
| 3014 | + | |
| 3015 | + | |
| 3016 | + | |
| 3017 | + | |
| 3018 | + | |
| 3019 | + | |
| 3020 | + | |
| 3021 | + | |
| 3022 | + | |
| 3023 | + | |
| 3024 | + | |
| 3025 | + | |
| 3026 | + | |
| 3027 | + | |
| 3028 | + | |
2992 | 3029 | | |
2993 | 3030 | | |
2994 | 3031 | | |
| |||
0 commit comments