You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if chan.get_latest_complete_monitor_update_id() > max_in_flight_update_id {
8426
-
// If the channel is ahead of the monitor, return InvalidValue:
8427
-
log_error!(args.logger,"A ChannelMonitor is stale compared to the current ChannelManager! This indicates a potentially-critical violation of the chain::Watch API!");
8428
-
log_error!(args.logger," The ChannelMonitor for channel {} is at update_id {} with update_id through {} in-flight",
log_error!(args.logger," but the ChannelManager is at update_id {}.", chan.get_latest_complete_monitor_update_id());
8431
-
log_error!(args.logger," The chain::Watch API *requires* that monitors are persisted durably before returning,");
8432
-
log_error!(args.logger," client applications must ensure that ChannelMonitor data is always available and the latest to avoid funds loss!");
8433
-
log_error!(args.logger," Without the latest ChannelMonitor we cannot continue without risking funds.");
8434
-
log_error!(args.logger," Please ensure the chain::Watch API requirements are met and file a bug report at https://github.com/lightningdevkit/rust-lightning");
8435
-
returnErr(DecodeError::InvalidValue);
8432
+
// Channels that were persisted have to be funded, otherwise they should have been
8433
+
// discarded.
8434
+
let funding_txo = chan.context.get_funding_txo().ok_or(DecodeError::InvalidValue)?;
8435
+
let monitor = args.channel_monitors.get(&funding_txo)
8436
+
.expect("We already checked for monitor presence when loading channels");
}else{debug_assert!(false,"We already loaded a channel, it has to have been funded");}
8444
+
}
8445
+
if chan.get_latest_complete_monitor_update_id() > max_in_flight_update_id {
8446
+
// If the channel is ahead of the monitor, return InvalidValue:
8447
+
log_error!(args.logger,"A ChannelMonitor is stale compared to the current ChannelManager! This indicates a potentially-critical violation of the chain::Watch API!");
8448
+
log_error!(args.logger," The ChannelMonitor for channel {} is at update_id {} with update_id through {} in-flight",
log_error!(args.logger," but the ChannelManager is at update_id {}.", chan.get_latest_unblocked_monitor_update_id());
8451
+
log_error!(args.logger," The chain::Watch API *requires* that monitors are persisted durably before returning,");
8452
+
log_error!(args.logger," client applications must ensure that ChannelMonitor data is always available and the latest to avoid funds loss!");
8453
+
log_error!(args.logger," Without the latest ChannelMonitor we cannot continue without risking funds.");
8454
+
log_error!(args.logger," Please ensure the chain::Watch API requirements are met and file a bug report at https://github.com/lightningdevkit/rust-lightning");
log_error!(args.logger,"A ChannelMonitor is missing even though we have in-flight updates for it! This indicates a potentially-critical violation of the chain::Watch API!");
8467
8474
log_error!(args.logger," The ChannelMonitor for channel {} is missing.",
0 commit comments