Skip to content

Commit 1bee708

Browse files
committed
Set logging metadata when we fail to apply a ChannelMonitorUpdate
Now that we provide the counterparty node id, we can set logging metadata with a counterparty node id and and channel id, which we do here.
1 parent 07b5355 commit 1bee708

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lightning/src/chain/chainmonitor.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ use crate::sign::ecdsa::WriteableEcdsaChannelSigner;
3535
use crate::events;
3636
use crate::events::{Event, EventHandler};
3737
use crate::util::atomic_counter::AtomicCounter;
38-
use crate::util::logger::Logger;
38+
use crate::util::logger::{Logger, WithContext};
3939
use crate::util::errors::APIError;
4040
use crate::util::wakers::{Future, Notifier};
4141
use crate::ln::channelmanager::ChannelDetails;
@@ -757,7 +757,8 @@ where C::Target: chain::Filter,
757757
let monitors = self.monitors.read().unwrap();
758758
match monitors.get(&funding_txo) {
759759
None => {
760-
log_error!(self.logger, "Failed to update channel monitor: no such monitor registered");
760+
let logger = WithContext::from(&self.logger, update.counterparty_node_id, Some(funding_txo.to_channel_id()));
761+
log_error!(logger, "Failed to update channel monitor: no such monitor registered");
761762

762763
// We should never ever trigger this from within ChannelManager. Technically a
763764
// user could use this object with some proxying in between which makes this

0 commit comments

Comments
 (0)