mirror of
https://github.com/lightningdevkit/rust-lightning.git
synced 2025-02-27 08:28:49 +01:00
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. |
||
---|---|---|
.. | ||
chan_utils.rs | ||
chanmon_update_fail_tests.rs | ||
channel.rs | ||
channelmanager.rs | ||
features.rs | ||
functional_test_utils.rs | ||
functional_tests.rs | ||
inbound_payment.rs | ||
mod.rs | ||
monitor_tests.rs | ||
msgs.rs | ||
onion_route_tests.rs | ||
onion_utils.rs | ||
outbound_payment.rs | ||
payment_tests.rs | ||
peer_channel_encryptor.rs | ||
peer_handler.rs | ||
priv_short_conf_tests.rs | ||
reload_tests.rs | ||
reorg_tests.rs | ||
script.rs | ||
shutdown_tests.rs | ||
wire.rs |