Commit 9de0830
chanmon_consistency: resync stale monitors to chain tip during settlement
After a node reload with an older monitor, the fuzzer's node_height
tracking variable stays at the pre-reload height. During settlement,
sync_with_chain_state starts from node_height, so it never re-delivers
the blocks that the stale monitor missed. If a commitment tx was
confirmed in one of those missed blocks, the monitor never learns about
the funding spend, causing get_claimable_balances() to incorrectly
report a ClaimableOnChannelClose balance.
Fix this by resetting each node_height to the minimum of its current
value and all its monitors' best_block heights at the start of
settlement, ensuring sync_with_chain_state re-delivers missed blocks.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent 834f2e5 commit 9de0830
1 file changed
Lines changed: 17 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2875 | 2875 | | |
2876 | 2876 | | |
2877 | 2877 | | |
| 2878 | + | |
| 2879 | + | |
| 2880 | + | |
| 2881 | + | |
| 2882 | + | |
| 2883 | + | |
| 2884 | + | |
| 2885 | + | |
| 2886 | + | |
| 2887 | + | |
| 2888 | + | |
| 2889 | + | |
| 2890 | + | |
| 2891 | + | |
| 2892 | + | |
| 2893 | + | |
| 2894 | + | |
2878 | 2895 | | |
2879 | 2896 | | |
2880 | 2897 | | |
| |||
0 commit comments