Commit 9852b84
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 7cfd9a0 commit 9852b84
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 | |
|---|---|---|---|
| |||
7506 | 7506 | | |
7507 | 7507 | | |
7508 | 7508 | | |
7509 | | - | |
7510 | | - | |
7511 | | - | |
7512 | | - | |
| 7509 | + | |
7513 | 7510 | | |
7514 | 7511 | | |
7515 | 7512 | | |
7516 | | - | |
| 7513 | + | |
7517 | 7514 | | |
7518 | 7515 | | |
7519 | 7516 | | |
| |||
0 commit comments