Commit 704f3db
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 81c12e4 commit 704f3db
2 files changed
+17
-6
lines changed| 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 | | |
| |||
4993 | 4998 | | |
4994 | 4999 | | |
4995 | 5000 | | |
| 5001 | + | |
| 5002 | + | |
| 5003 | + | |
| 5004 | + | |
| 5005 | + | |
4996 | 5006 | | |
4997 | 5007 | | |
4998 | 5008 | | |
| |||
6591 | 6601 | | |
6592 | 6602 | | |
6593 | 6603 | | |
| 6604 | + | |
6594 | 6605 | | |
6595 | 6606 | | |
6596 | 6607 | | |
| |||
6865 | 6876 | | |
6866 | 6877 | | |
6867 | 6878 | | |
| 6879 | + | |
| 6880 | + | |
6868 | 6881 | | |
6869 | 6882 | | |
6870 | 6883 | | |
| |||
6886 | 6899 | | |
6887 | 6900 | | |
6888 | 6901 | | |
| 6902 | + | |
6889 | 6903 | | |
6890 | 6904 | | |
6891 | 6905 | | |
| |||
7052 | 7066 | | |
7053 | 7067 | | |
7054 | 7068 | | |
7055 | | - | |
| 7069 | + | |
7056 | 7070 | | |
7057 | 7071 | | |
7058 | 7072 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7560 | 7560 | | |
7561 | 7561 | | |
7562 | 7562 | | |
7563 | | - | |
7564 | | - | |
7565 | | - | |
7566 | | - | |
| 7563 | + | |
7567 | 7564 | | |
7568 | 7565 | | |
7569 | 7566 | | |
7570 | | - | |
| 7567 | + | |
7571 | 7568 | | |
7572 | 7569 | | |
7573 | 7570 | | |
| |||
0 commit comments