@@ -1490,8 +1490,6 @@ pub(super) struct ChannelContext<SP: Deref> where SP::Target: SignerProvider {
1490
1490
/// If we can't release a [`ChannelMonitorUpdate`] until some external action completes, we
1491
1491
/// store it here and only release it to the `ChannelManager` once it asks for it.
1492
1492
blocked_monitor_updates: Vec<PendingChannelMonitorUpdate>,
1493
-
1494
- last_local_balance_msats: u64,
1495
1493
}
1496
1494
1497
1495
impl<SP: Deref> ChannelContext<SP> where SP::Target: SignerProvider {
@@ -1830,8 +1828,6 @@ impl<SP: Deref> ChannelContext<SP> where SP::Target: SignerProvider {
1830
1828
blocked_monitor_updates: Vec::new(),
1831
1829
1832
1830
is_manual_broadcast: false,
1833
-
1834
- last_local_balance_msats: 0,
1835
1831
};
1836
1832
1837
1833
Ok(channel_context)
@@ -2060,12 +2056,10 @@ impl<SP: Deref> ChannelContext<SP> where SP::Target: SignerProvider {
2060
2056
blocked_monitor_updates: Vec::new(),
2061
2057
local_initiated_shutdown: None,
2062
2058
is_manual_broadcast: false,
2063
-
2064
- last_local_balance_msats: 0,
2065
2059
})
2066
2060
}
2067
2061
2068
- pub(crate) fn get_last_local_balance_msats (&self) -> u64 {self.last_local_balance_msats }
2062
+ pub(crate) fn get_value_to_self_msat (&self) -> u64 {self.value_to_self_msat }
2069
2063
2070
2064
/// Allowed in any state (including after shutdown)
2071
2065
pub fn get_update_time_counter(&self) -> u32 {
@@ -3537,7 +3531,7 @@ impl<SP: Deref> ChannelContext<SP> where SP::Target: SignerProvider {
3537
3531
counterparty_node_id: self.counterparty_node_id,
3538
3532
unbroadcasted_funding_tx,
3539
3533
channel_funding_txo: self.get_funding_txo(),
3540
- last_local_balance_msats: self.last_local_balance_msats ,
3534
+ last_local_balance_msats: self.value_to_self_msat ,
3541
3535
}
3542
3536
}
3543
3537
@@ -6228,7 +6222,7 @@ impl<SP: Deref> Channel<SP> where
6228
6222
counterparty_node_id: self.context.counterparty_node_id,
6229
6223
unbroadcasted_funding_tx: self.context.unbroadcasted_funding(),
6230
6224
channel_funding_txo: self.context.get_funding_txo(),
6231
- last_local_balance_msats: self.context.last_local_balance_msats ,
6225
+ last_local_balance_msats: self.context.value_to_self_msat ,
6232
6226
};
6233
6227
let tx = self.build_signed_closing_transaction(&mut closing_tx, &msg.signature, &sig);
6234
6228
self.context.channel_state = ChannelState::ShutdownComplete;
@@ -6264,7 +6258,7 @@ impl<SP: Deref> Channel<SP> where
6264
6258
counterparty_node_id: self.context.counterparty_node_id,
6265
6259
unbroadcasted_funding_tx: self.context.unbroadcasted_funding(),
6266
6260
channel_funding_txo: self.context.get_funding_txo(),
6267
- last_local_balance_msats: self.context.last_local_balance_msats ,
6261
+ last_local_balance_msats: self.context.value_to_self_msat ,
6268
6262
};
6269
6263
self.context.channel_state = ChannelState::ShutdownComplete;
6270
6264
self.context.update_time_counter += 1;
@@ -9587,8 +9581,6 @@ impl<'a, 'b, 'c, ES: Deref, SP: Deref> ReadableArgs<(&'a ES, &'b SP, u32, &'c Ch
9587
9581
9588
9582
blocked_monitor_updates: blocked_monitor_updates.unwrap(),
9589
9583
is_manual_broadcast: is_manual_broadcast.unwrap_or(false),
9590
-
9591
- last_local_balance_msats: 0,
9592
9584
},
9593
9585
#[cfg(any(dual_funding, splicing))]
9594
9586
dual_funding_channel_context: None,
0 commit comments