Skip to content

Commit ee7f03d

Browse files
committed
Log channel balances before deleting channel data
It would be even nicer to log the `ChannelDetails`, but then we would have to modify the macro and that is too painful.
1 parent da58353 commit ee7f03d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lightning/src/ln/channelmanager.rs

+6
Original file line numberDiff line numberDiff line change
@@ -1992,6 +1992,12 @@ macro_rules! try_chan_phase_entry {
19921992
macro_rules! remove_channel_phase {
19931993
($self: expr, $entry: expr) => {
19941994
{
1995+
let context = &$entry.get().context();
1996+
let balance = context.get_available_balances(&$self.fee_estimator);
1997+
1998+
log_debug!($self.logger, "Channel balance for {} before closure balance_msat={}, inbound_capacity_msat={}, outbound_capacity_msat={}",
1999+
log_bytes!(context.channel_id().0[..]), balance.balance_msat, balance.inbound_capacity_msat, balance.outbound_capacity_msat);
2000+
19952001
let channel = $entry.remove_entry().1;
19962002
update_maps_on_chan_removal!($self, &channel.context());
19972003
channel

0 commit comments

Comments
 (0)