Commit 2ba5289
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 ae4df0a commit 2ba5289
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 | | |
| |||
4958 | 4963 | | |
4959 | 4964 | | |
4960 | 4965 | | |
| 4966 | + | |
| 4967 | + | |
| 4968 | + | |
| 4969 | + | |
| 4970 | + | |
4961 | 4971 | | |
4962 | 4972 | | |
4963 | 4973 | | |
| |||
6545 | 6555 | | |
6546 | 6556 | | |
6547 | 6557 | | |
| 6558 | + | |
6548 | 6559 | | |
6549 | 6560 | | |
6550 | 6561 | | |
| |||
6817 | 6828 | | |
6818 | 6829 | | |
6819 | 6830 | | |
| 6831 | + | |
| 6832 | + | |
6820 | 6833 | | |
6821 | 6834 | | |
6822 | 6835 | | |
| |||
6836 | 6849 | | |
6837 | 6850 | | |
6838 | 6851 | | |
| 6852 | + | |
6839 | 6853 | | |
6840 | 6854 | | |
6841 | 6855 | | |
| |||
7000 | 7014 | | |
7001 | 7015 | | |
7002 | 7016 | | |
7003 | | - | |
| 7017 | + | |
7004 | 7018 | | |
7005 | 7019 | | |
7006 | 7020 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7557 | 7557 | | |
7558 | 7558 | | |
7559 | 7559 | | |
7560 | | - | |
7561 | | - | |
7562 | | - | |
7563 | | - | |
| 7560 | + | |
7564 | 7561 | | |
7565 | 7562 | | |
7566 | 7563 | | |
7567 | | - | |
| 7564 | + | |
7568 | 7565 | | |
7569 | 7566 | | |
7570 | 7567 | | |
| |||
0 commit comments