Commit 92fd015
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 ab21fbe commit 92fd015
2 files changed
+17
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
491 | 491 | | |
492 | 492 | | |
493 | 493 | | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
494 | 499 | | |
495 | 500 | | |
496 | 501 | | |
| |||
4940 | 4945 | | |
4941 | 4946 | | |
4942 | 4947 | | |
| 4948 | + | |
| 4949 | + | |
| 4950 | + | |
| 4951 | + | |
| 4952 | + | |
4943 | 4953 | | |
4944 | 4954 | | |
4945 | 4955 | | |
| |||
6527 | 6537 | | |
6528 | 6538 | | |
6529 | 6539 | | |
| 6540 | + | |
6530 | 6541 | | |
6531 | 6542 | | |
6532 | 6543 | | |
| |||
6799 | 6810 | | |
6800 | 6811 | | |
6801 | 6812 | | |
| 6813 | + | |
| 6814 | + | |
6802 | 6815 | | |
6803 | 6816 | | |
6804 | 6817 | | |
| |||
6818 | 6831 | | |
6819 | 6832 | | |
6820 | 6833 | | |
| 6834 | + | |
6821 | 6835 | | |
6822 | 6836 | | |
6823 | 6837 | | |
| |||
6982 | 6996 | | |
6983 | 6997 | | |
6984 | 6998 | | |
6985 | | - | |
| 6999 | + | |
6986 | 7000 | | |
6987 | 7001 | | |
6988 | 7002 | | |
| |||
| 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