Skip to content

Commit 17b4972

Browse files
committed
Rename chan_phase as appropriate
Now that ChannelPhase has been renamed, drop phase from related identifiers.
1 parent 7e95cba commit 17b4972

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

lightning/src/ln/channelmanager.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3959,8 +3959,8 @@ where
39593959
.lock().unwrap();
39603960
let peer_state = &mut *peer_state_lock;
39613961
match peer_state.channel_by_id.entry(channel_id) {
3962-
hash_map::Entry::Occupied(mut chan_phase) => {
3963-
if let Some(chan) = chan_phase.get_mut().as_funded_mut() {
3962+
hash_map::Entry::Occupied(mut chan_entry) => {
3963+
if let Some(chan) = chan_entry.get_mut().as_funded_mut() {
39643964
handle_new_monitor_update!(self, funding_txo,
39653965
monitor_update, peer_state_lock, peer_state, per_peer_state, chan);
39663966
return;
@@ -4110,11 +4110,11 @@ where
41104110
(chan_entry.get_mut().context_mut().force_shutdown(false, closure_reason), None)
41114111
},
41124112
};
4113-
let chan_phase = remove_channel_entry!(self, peer_state, chan_entry, shutdown_res);
4113+
let chan = remove_channel_entry!(self, peer_state, chan_entry, shutdown_res);
41144114
mem::drop(peer_state);
41154115
mem::drop(per_peer_state);
41164116
self.finish_close_channel(shutdown_res);
4117-
(update_opt, chan_phase.context().get_counterparty_node_id())
4117+
(update_opt, chan.context().get_counterparty_node_id())
41184118
} else if peer_state.inbound_channel_request_by_id.remove(channel_id).is_some() {
41194119
log_error!(logger, "Force-closing channel {}", &channel_id);
41204120
// N.B. that we don't send any channel close event here: we
@@ -9292,9 +9292,9 @@ This indicates a bug inside LDK. Please report this error at https://github.com/
92929292
ClosureReason::HolderForceClosed { broadcasted_latest_txn: Some(true) }
92939293
};
92949294
let mut shutdown_res = chan_entry.get_mut().context_mut().force_shutdown(false, reason.clone());
9295-
let chan_phase = remove_channel_entry!(self, peer_state, chan_entry, shutdown_res);
9295+
let chan = remove_channel_entry!(self, peer_state, chan_entry, shutdown_res);
92969296
failed_channels.push(shutdown_res);
9297-
if let Some(chan) = chan_phase.as_funded() {
9297+
if let Some(chan) = chan.as_funded() {
92989298
if let Ok(update) = self.get_channel_update_for_broadcast(chan) {
92999299
let mut pending_broadcast_messages = self.pending_broadcast_messages.lock().unwrap();
93009300
pending_broadcast_messages.push(events::MessageSendEvent::BroadcastChannelUpdate {

0 commit comments

Comments
 (0)