@@ -6002,6 +6002,8 @@ where
6002
6002
}
6003
6003
6004
6004
fn do_accept_inbound_channel(&self, temporary_channel_id: &ChannelId, counterparty_node_id: &PublicKey, accept_0conf: bool, user_channel_id: u128) -> Result<(), APIError> {
6005
+
6006
+ let logger = WithContext::from(&self.logger, Some(*counterparty_node_id), Some(*temporary_channel_id));
6005
6007
let _persistence_guard = PersistenceNotifierGuard::notify_on_drop(self);
6006
6008
6007
6009
let peers_without_funded_channels =
@@ -6010,7 +6012,7 @@ where
6010
6012
let peer_state_mutex = per_peer_state.get(counterparty_node_id)
6011
6013
.ok_or_else(|| {
6012
6014
let err_str = format!("Can't find a peer matching the passed counterparty node_id {}", counterparty_node_id);
6013
- log_error!(self. logger, "{}", err_str);
6015
+ log_error!(logger, "{}", err_str);
6014
6016
6015
6017
APIError::ChannelUnavailable { err: err_str }
6016
6018
})?;
@@ -6030,14 +6032,14 @@ where
6030
6032
&unaccepted_channel.open_channel_msg, user_channel_id, &self.default_configuration, best_block_height,
6031
6033
&self.logger, accept_0conf).map_err(|e| {
6032
6034
let err_str = e.to_string();
6033
- log_error!(self. logger, "{}", err_str);
6035
+ log_error!(logger, "{}", err_str);
6034
6036
6035
6037
APIError::ChannelUnavailable { err: err_str }
6036
6038
})
6037
6039
}
6038
6040
_ => {
6039
6041
let err_str = "No such channel awaiting to be accepted.".to_owned();
6040
- log_error!(self. logger, "{}", err_str);
6042
+ log_error!(logger, "{}", err_str);
6041
6043
6042
6044
Err(APIError::APIMisuseError { err: err_str })
6043
6045
}
@@ -6055,7 +6057,7 @@ where
6055
6057
};
6056
6058
peer_state.pending_msg_events.push(send_msg_err_event);
6057
6059
let err_str = "Please use accept_inbound_channel_from_trusted_peer_0conf to accept channels with zero confirmations.".to_owned();
6058
- log_error!(self. logger, "{}", err_str);
6060
+ log_error!(logger, "{}", err_str);
6059
6061
6060
6062
return Err(APIError::APIMisuseError { err: err_str });
6061
6063
} else {
@@ -6071,7 +6073,7 @@ where
6071
6073
};
6072
6074
peer_state.pending_msg_events.push(send_msg_err_event);
6073
6075
let err_str = "Too many peers with unfunded channels, refusing to accept new ones".to_owned();
6074
- log_error!(self. logger, "{}", err_str);
6076
+ log_error!(logger, "{}", err_str);
6075
6077
6076
6078
return Err(APIError::APIMisuseError { err: err_str });
6077
6079
}
0 commit comments