Skip to content

Commit 0068c7e

Browse files
committed
f rename to quiescent_action + move to FundedChannel
1 parent 239c4f8 commit 0068c7e

File tree

1 file changed

+13
-15
lines changed

1 file changed

+13
-15
lines changed

lightning/src/ln/channel.rs

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1877,6 +1877,7 @@ where
18771877
holder_commitment_point,
18781878
#[cfg(splicing)]
18791879
pending_splice: None,
1880+
quiescent_action: None,
18801881
};
18811882
let res = funded_channel.initial_commitment_signed_v2(msg, best_block, signer_provider, logger)
18821883
.map(|monitor| (Some(monitor), None))
@@ -2751,12 +2752,6 @@ where
27512752
/// If we can't release a [`ChannelMonitorUpdate`] until some external action completes, we
27522753
/// store it here and only release it to the `ChannelManager` once it asks for it.
27532754
blocked_monitor_updates: Vec<PendingChannelMonitorUpdate>,
2754-
2755-
/// Once we become quiescent, if we're the initiator, there's some action we'll want to take.
2756-
/// This keeps track of that action. Note that if we become quiescent and we're not the
2757-
/// initiator we may be able to merge this action into what the counterparty wanted to do (e.g.
2758-
/// in the case of splicing).
2759-
post_quiescence_action: Option<QuiescentAction>,
27602755
}
27612756

27622757
/// A channel struct implementing this trait can receive an initial counterparty commitment
@@ -3331,8 +3326,6 @@ where
33313326
blocked_monitor_updates: Vec::new(),
33323327

33333328
is_manual_broadcast: false,
3334-
3335-
post_quiescence_action: None,
33363329
};
33373330

33383331
Ok((funding, channel_context))
@@ -3569,8 +3562,6 @@ where
35693562
blocked_monitor_updates: Vec::new(),
35703563
local_initiated_shutdown: None,
35713564
is_manual_broadcast: false,
3572-
3573-
post_quiescence_action: None,
35743565
};
35753566

35763567
Ok((funding, channel_context))
@@ -6103,6 +6094,12 @@ where
61036094
/// Info about an in-progress, pending splice (if any), on the pre-splice channel
61046095
#[cfg(splicing)]
61056096
pending_splice: Option<PendingSplice>,
6097+
6098+
/// Once we become quiescent, if we're the initiator, there's some action we'll want to take.
6099+
/// This keeps track of that action. Note that if we become quiescent and we're not the
6100+
/// initiator we may be able to merge this action into what the counterparty wanted to do (e.g.
6101+
/// in the case of splicing).
6102+
quiescent_action: Option<QuiescentAction>,
61066103
}
61076104

61086105
#[cfg(splicing)]
@@ -11579,11 +11576,11 @@ where
1157911576
"Channel is not in a live state to propose quiescence".to_owned()
1158011577
));
1158111578
}
11582-
if self.context.post_quiescence_action.is_some() {
11579+
if self.quiescent_action.is_some() {
1158311580
return Err(ChannelError::Ignore("Channel is already quiescing".to_owned()));
1158411581
}
1158511582

11586-
self.context.post_quiescence_action = Some(action);
11583+
self.quiescent_action = Some(action);
1158711584
if self.context.channel_state.is_quiescent()
1158811585
|| self.context.channel_state.is_awaiting_quiescence()
1158911586
|| self.context.channel_state.is_local_stfu_sent()
@@ -11705,7 +11702,7 @@ where
1170511702
);
1170611703

1170711704
if is_holder_quiescence_initiator {
11708-
match self.context.post_quiescence_action.take() {
11705+
match self.quiescent_action.take() {
1170911706
None => {
1171011707
debug_assert!(false);
1171111708
return Err(ChannelError::WarnAndDisconnect(
@@ -12084,6 +12081,7 @@ where
1208412081
holder_commitment_point,
1208512082
#[cfg(splicing)]
1208612083
pending_splice: None,
12084+
quiescent_action: None,
1208712085
};
1208812086

1208912087
let need_channel_ready = channel.check_get_channel_ready(0, logger).is_some()
@@ -12370,6 +12368,7 @@ where
1237012368
holder_commitment_point,
1237112369
#[cfg(splicing)]
1237212370
pending_splice: None,
12371+
quiescent_action: None,
1237312372
};
1237412373
let need_channel_ready = channel.check_get_channel_ready(0, logger).is_some()
1237512374
|| channel.context.signer_pending_channel_ready;
@@ -14022,13 +14021,12 @@ where
1402214021

1402314022
blocked_monitor_updates: blocked_monitor_updates.unwrap(),
1402414023
is_manual_broadcast: is_manual_broadcast.unwrap_or(false),
14025-
14026-
post_quiescence_action: None,
1402714024
},
1402814025
interactive_tx_signing_session,
1402914026
holder_commitment_point,
1403014027
#[cfg(splicing)]
1403114028
pending_splice: None,
14029+
quiescent_action: None,
1403214030
})
1403314031
}
1403414032
}

0 commit comments

Comments
 (0)