Commit 91707fb
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 e7868d2 commit 91707fb
2 files changed
+17
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
490 | 490 | | |
491 | 491 | | |
492 | 492 | | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
493 | 498 | | |
494 | 499 | | |
495 | 500 | | |
| |||
4939 | 4944 | | |
4940 | 4945 | | |
4941 | 4946 | | |
| 4947 | + | |
| 4948 | + | |
| 4949 | + | |
| 4950 | + | |
| 4951 | + | |
4942 | 4952 | | |
4943 | 4953 | | |
4944 | 4954 | | |
| |||
6526 | 6536 | | |
6527 | 6537 | | |
6528 | 6538 | | |
| 6539 | + | |
6529 | 6540 | | |
6530 | 6541 | | |
6531 | 6542 | | |
| |||
6798 | 6809 | | |
6799 | 6810 | | |
6800 | 6811 | | |
| 6812 | + | |
| 6813 | + | |
6801 | 6814 | | |
6802 | 6815 | | |
6803 | 6816 | | |
| |||
6817 | 6830 | | |
6818 | 6831 | | |
6819 | 6832 | | |
| 6833 | + | |
6820 | 6834 | | |
6821 | 6835 | | |
6822 | 6836 | | |
| |||
6981 | 6995 | | |
6982 | 6996 | | |
6983 | 6997 | | |
6984 | | - | |
| 6998 | + | |
6985 | 6999 | | |
6986 | 7000 | | |
6987 | 7001 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7442 | 7442 | | |
7443 | 7443 | | |
7444 | 7444 | | |
7445 | | - | |
7446 | | - | |
7447 | | - | |
7448 | | - | |
| 7445 | + | |
7449 | 7446 | | |
7450 | 7447 | | |
7451 | 7448 | | |
7452 | | - | |
| 7449 | + | |
7453 | 7450 | | |
7454 | 7451 | | |
7455 | 7452 | | |
| |||
0 commit comments