Skip to content

Commit 727a12d

Browse files
committed
f keep shutdown_msg name
1 parent fe31dfa commit 727a12d

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

lightning/src/ln/channel.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,7 @@ pub(super) struct ReestablishResponses {
409409
pub order: RAACommitmentOrder,
410410
pub mon_update: Option<ChannelMonitorUpdate>,
411411
pub holding_cell_failed_htlcs: Vec<(HTLCSource, PaymentHash)>,
412-
pub shutdown: Option<msgs::Shutdown>,
412+
pub shutdown_msg: Option<msgs::Shutdown>,
413413
}
414414

415415
/// If the majority of the channels funds are to the fundee and the initiator holds only just
@@ -3548,7 +3548,7 @@ impl<Signer: Sign> Channel<Signer> {
35483548
// remaining cases either succeed or ErrorMessage-fail).
35493549
self.channel_state &= !(ChannelState::PeerDisconnected as u32);
35503550

3551-
let shutdown = if self.channel_state & (ChannelState::LocalShutdownSent as u32) != 0 {
3551+
let shutdown_msg = if self.channel_state & (ChannelState::LocalShutdownSent as u32) != 0 {
35523552
assert!(self.shutdown_scriptpubkey.is_some());
35533553
Some(msgs::Shutdown {
35543554
channel_id: self.channel_id,
@@ -3569,7 +3569,7 @@ impl<Signer: Sign> Channel<Signer> {
35693569
raa: None, commitment_update: None, mon_update: None,
35703570
order: RAACommitmentOrder::CommitmentFirst,
35713571
holding_cell_failed_htlcs: Vec::new(),
3572-
shutdown
3572+
shutdown_msg
35733573
});
35743574
}
35753575

@@ -3583,7 +3583,7 @@ impl<Signer: Sign> Channel<Signer> {
35833583
raa: None, commitment_update: None, mon_update: None,
35843584
order: RAACommitmentOrder::CommitmentFirst,
35853585
holding_cell_failed_htlcs: Vec::new(),
3586-
shutdown
3586+
shutdown_msg
35873587
});
35883588
}
35893589

@@ -3635,7 +3635,7 @@ impl<Signer: Sign> Channel<Signer> {
36353635
panic!("Got non-channel-failing result from free_holding_cell_htlcs"),
36363636
Ok((Some((commitment_update, monitor_update)), holding_cell_failed_htlcs)) => {
36373637
Ok(ReestablishResponses {
3638-
funding_locked, shutdown,
3638+
funding_locked, shutdown_msg,
36393639
raa: required_revoke,
36403640
commitment_update: Some(commitment_update),
36413641
order: self.resend_order.clone(),
@@ -3645,7 +3645,7 @@ impl<Signer: Sign> Channel<Signer> {
36453645
},
36463646
Ok((None, holding_cell_failed_htlcs)) => {
36473647
Ok(ReestablishResponses {
3648-
funding_locked, shutdown,
3648+
funding_locked, shutdown_msg,
36493649
raa: required_revoke,
36503650
commitment_update: None,
36513651
order: self.resend_order.clone(),
@@ -3656,7 +3656,7 @@ impl<Signer: Sign> Channel<Signer> {
36563656
}
36573657
} else {
36583658
Ok(ReestablishResponses {
3659-
funding_locked, shutdown,
3659+
funding_locked, shutdown_msg,
36603660
raa: required_revoke,
36613661
commitment_update: None,
36623662
order: self.resend_order.clone(),
@@ -3674,14 +3674,14 @@ impl<Signer: Sign> Channel<Signer> {
36743674
if self.channel_state & (ChannelState::MonitorUpdateFailed as u32) != 0 {
36753675
self.monitor_pending_commitment_signed = true;
36763676
Ok(ReestablishResponses {
3677-
funding_locked, shutdown,
3677+
funding_locked, shutdown_msg,
36783678
commitment_update: None, raa: None, mon_update: None,
36793679
order: self.resend_order.clone(),
36803680
holding_cell_failed_htlcs: Vec::new(),
36813681
})
36823682
} else {
36833683
Ok(ReestablishResponses {
3684-
funding_locked, shutdown,
3684+
funding_locked, shutdown_msg,
36853685
raa: required_revoke,
36863686
commitment_update: Some(self.get_last_commitment_update(logger)),
36873687
order: self.resend_order.clone(),

lightning/src/ln/channelmanager.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4724,7 +4724,7 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
47244724
// add-HTLCs on disconnect, we may be handed HTLCs to fail backwards here.
47254725
let responses = try_chan_entry!(self, chan.get_mut().channel_reestablish(msg, &self.logger), channel_state, chan);
47264726
let mut channel_update = None;
4727-
if let Some(msg) = responses.shutdown {
4727+
if let Some(msg) = responses.shutdown_msg {
47284728
channel_state.pending_msg_events.push(events::MessageSendEvent::SendShutdown {
47294729
node_id: counterparty_node_id.clone(),
47304730
msg,

0 commit comments

Comments
 (0)