match monitors.get_mut(&funding_txo) {
None => {
log_error!(self.logger, "Failed to update channel monitor: no such monitor registered");
+
+ // We should never ever trigger this from within ChannelManager. Technically a
+ // user could use this object with some proxying in between which makes this
+ // possible, but in tests and fuzzing, this should be a panic.
+ #[cfg(any(test, feature = "fuzztarget"))]
+ panic!("ChannelManager generated a channel update for a channel that was not yet registered!");
+ #[cfg(not(any(test, feature = "fuzztarget")))]
Err(ChannelMonitorUpdateErr::PermanentFailure)
},
Some(orig_monitor) => {
log_trace!(self.logger, "Updating Channel Monitor for channel {}", log_funding_info!(orig_monitor));
- let update_res = orig_monitor.update_monitor(&update, &self.broadcaster, &self.logger);
+ let update_res = orig_monitor.update_monitor(&update, &self.broadcaster, &self.fee_estimator, &self.logger);
if let Err(e) = &update_res {
log_error!(self.logger, "Failed to update channel monitor: {:?}", e);
}