Commit 51c3b37
committed
Store + process pending
The previous commits set up the ability for us to hold
`ChannelMonitorUpdate`s which are pending until we're ready to pass
them to users and have them be applied. However, if the
`ChannelManager` is persisted while we're waiting to give the user
a `ChannelMonitorUpdate` we'll be confused on restart - seeing our
latest `ChannelMonitor` state as stale compared to our
`ChannelManager` - a critical error.
Luckily the solution is trivial, we simply need to store the
pending `ChannelMonitorUpdate` state and load it with the
`ChannelManager` data, allowing stale monitors on load as long as
we have the missing pending updates between where we are and the
latest `ChannelMonitor` state.ChannelMonitorUpdates in Channel
1 parent 02c1b2b commit 51c3b37
2 files changed
Lines changed: 17 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
489 | 489 | | |
490 | 490 | | |
491 | 491 | | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
492 | 497 | | |
493 | 498 | | |
494 | 499 | | |
| |||
4984 | 4989 | | |
4985 | 4990 | | |
4986 | 4991 | | |
| 4992 | + | |
| 4993 | + | |
| 4994 | + | |
| 4995 | + | |
| 4996 | + | |
4987 | 4997 | | |
4988 | 4998 | | |
4989 | 4999 | | |
| |||
6597 | 6607 | | |
6598 | 6608 | | |
6599 | 6609 | | |
| 6610 | + | |
6600 | 6611 | | |
6601 | 6612 | | |
6602 | 6613 | | |
| |||
6873 | 6884 | | |
6874 | 6885 | | |
6875 | 6886 | | |
| 6887 | + | |
| 6888 | + | |
6876 | 6889 | | |
6877 | 6890 | | |
6878 | 6891 | | |
| |||
6895 | 6908 | | |
6896 | 6909 | | |
6897 | 6910 | | |
| 6911 | + | |
6898 | 6912 | | |
6899 | 6913 | | |
6900 | 6914 | | |
| |||
7064 | 7078 | | |
7065 | 7079 | | |
7066 | 7080 | | |
7067 | | - | |
| 7081 | + | |
7068 | 7082 | | |
7069 | 7083 | | |
7070 | 7084 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7646 | 7646 | | |
7647 | 7647 | | |
7648 | 7648 | | |
7649 | | - | |
7650 | | - | |
7651 | | - | |
7652 | | - | |
| 7649 | + | |
7653 | 7650 | | |
7654 | 7651 | | |
7655 | 7652 | | |
7656 | | - | |
| 7653 | + | |
7657 | 7654 | | |
7658 | 7655 | | |
7659 | 7656 | | |
| |||
0 commit comments