@@ -1836,7 +1836,7 @@ where
1836
1836
let phase = core::mem::replace(&mut self.phase, ChannelPhase::Undefined);
1837
1837
match phase {
1838
1838
ChannelPhase::UnfundedV2(chan) => {
1839
- let holder_commitment_point = match chan.unfunded_context.holder_commitment_point {
1839
+ let initial_holder_commitment_point = match chan.unfunded_context.initial_holder_commitment_point {
1840
1840
Some(point) => point,
1841
1841
None => {
1842
1842
let channel_id = chan.context.channel_id();
@@ -1851,7 +1851,7 @@ where
1851
1851
pending_funding: vec![],
1852
1852
context: chan.context,
1853
1853
interactive_tx_signing_session: chan.interactive_tx_signing_session,
1854
- holder_commitment_point,
1854
+ holder_commitment_point: initial_holder_commitment_point ,
1855
1855
#[cfg(splicing)]
1856
1856
pending_splice: None,
1857
1857
};
@@ -1988,7 +1988,7 @@ pub(super) struct UnfundedChannelContext {
1988
1988
/// in a timely manner.
1989
1989
unfunded_channel_age_ticks: usize,
1990
1990
/// Tracks the commitment number and commitment point before the channel is funded.
1991
- holder_commitment_point : Option<HolderCommitmentPoint>,
1991
+ initial_holder_commitment_point : Option<HolderCommitmentPoint>,
1992
1992
}
1993
1993
1994
1994
impl UnfundedChannelContext {
@@ -2002,7 +2002,7 @@ impl UnfundedChannelContext {
2002
2002
}
2003
2003
2004
2004
fn transaction_number(&self) -> u64 {
2005
- self.holder_commitment_point
2005
+ self.initial_holder_commitment_point
2006
2006
.as_ref()
2007
2007
.map(|point| point.transaction_number())
2008
2008
.unwrap_or(INITIAL_COMMITMENT_NUMBER)
@@ -11832,7 +11832,7 @@ where
11832
11832
)?;
11833
11833
let unfunded_context = UnfundedChannelContext {
11834
11834
unfunded_channel_age_ticks: 0,
11835
- holder_commitment_point : HolderCommitmentPoint::new(&context.holder_signer, &context.secp_ctx),
11835
+ initial_holder_commitment_point : HolderCommitmentPoint::new(&context.holder_signer, &context.secp_ctx),
11836
11836
};
11837
11837
11838
11838
// We initialize `signer_pending_open_channel` to false, and leave setting the flag
@@ -11963,7 +11963,7 @@ where
11963
11963
panic!("Tried to send an open_channel for a channel that has already advanced");
11964
11964
}
11965
11965
11966
- let first_per_commitment_point = match self.unfunded_context.holder_commitment_point {
11966
+ let first_per_commitment_point = match self.unfunded_context.initial_holder_commitment_point {
11967
11967
Some(holder_commitment_point) if holder_commitment_point.can_advance() => {
11968
11968
self.signer_pending_open_channel = false;
11969
11969
holder_commitment_point.point()
@@ -12034,15 +12034,15 @@ where
12034
12034
if !matches!(self.context.channel_state, ChannelState::FundingNegotiated(_)) {
12035
12035
return Err((self, ChannelError::close("Received funding_signed in strange state!".to_owned())));
12036
12036
}
12037
- let mut holder_commitment_point = match self.unfunded_context.holder_commitment_point {
12037
+ let mut initial_holder_commitment_point = match self.unfunded_context.initial_holder_commitment_point {
12038
12038
Some(point) => point,
12039
12039
None => return Err((self, ChannelError::close("Received funding_signed before our first commitment point was available".to_owned()))),
12040
12040
};
12041
- self.context.assert_no_commitment_advancement(holder_commitment_point .transaction_number(), "funding_signed");
12041
+ self.context.assert_no_commitment_advancement(initial_holder_commitment_point .transaction_number(), "funding_signed");
12042
12042
12043
12043
let (channel_monitor, _) = match self.initial_commitment_signed(
12044
12044
self.context.channel_id(), msg.signature,
12045
- &mut holder_commitment_point , best_block, signer_provider, logger
12045
+ &mut initial_holder_commitment_point , best_block, signer_provider, logger
12046
12046
) {
12047
12047
Ok(channel_monitor) => channel_monitor,
12048
12048
Err(err) => return Err((self, err)),
@@ -12055,7 +12055,7 @@ where
12055
12055
pending_funding: vec![],
12056
12056
context: self.context,
12057
12057
interactive_tx_signing_session: None,
12058
- holder_commitment_point,
12058
+ holder_commitment_point: initial_holder_commitment_point ,
12059
12059
#[cfg(splicing)]
12060
12060
pending_splice: None,
12061
12061
};
@@ -12074,10 +12074,10 @@ where
12074
12074
) -> (Option<msgs::OpenChannel>, Option<msgs::FundingCreated>) where L::Target: Logger {
12075
12075
// If we were pending a commitment point, retry the signer and advance to an
12076
12076
// available state.
12077
- if self.unfunded_context.holder_commitment_point .is_none() {
12078
- self.unfunded_context.holder_commitment_point = HolderCommitmentPoint::new(&self.context.holder_signer, &self.context.secp_ctx);
12077
+ if self.unfunded_context.initial_holder_commitment_point .is_none() {
12078
+ self.unfunded_context.initial_holder_commitment_point = HolderCommitmentPoint::new(&self.context.holder_signer, &self.context.secp_ctx);
12079
12079
}
12080
- if let Some(ref mut point) = self.unfunded_context.holder_commitment_point {
12080
+ if let Some(ref mut point) = self.unfunded_context.initial_holder_commitment_point {
12081
12081
if !point.can_advance() {
12082
12082
point.try_resolve_pending(&self.context.holder_signer, &self.context.secp_ctx, logger);
12083
12083
}
@@ -12198,7 +12198,7 @@ where
12198
12198
)?;
12199
12199
let unfunded_context = UnfundedChannelContext {
12200
12200
unfunded_channel_age_ticks: 0,
12201
- holder_commitment_point : HolderCommitmentPoint::new(&context.holder_signer, &context.secp_ctx),
12201
+ initial_holder_commitment_point : HolderCommitmentPoint::new(&context.holder_signer, &context.secp_ctx),
12202
12202
};
12203
12203
let chan = Self { funding, context, unfunded_context, signer_pending_accept_channel: false };
12204
12204
Ok(chan)
@@ -12237,7 +12237,7 @@ where
12237
12237
fn generate_accept_channel_message<L: Deref>(
12238
12238
&mut self, _logger: &L
12239
12239
) -> Option<msgs::AcceptChannel> where L::Target: Logger {
12240
- let first_per_commitment_point = match self.unfunded_context.holder_commitment_point {
12240
+ let first_per_commitment_point = match self.unfunded_context.initial_holder_commitment_point {
12241
12241
Some(holder_commitment_point) if holder_commitment_point.can_advance() => {
12242
12242
self.signer_pending_accept_channel = false;
12243
12243
holder_commitment_point.point()
@@ -12310,18 +12310,18 @@ where
12310
12310
// channel.
12311
12311
return Err((self, ChannelError::close("Received funding_created after we got the channel!".to_owned())));
12312
12312
}
12313
- let mut holder_commitment_point = match self.unfunded_context.holder_commitment_point {
12313
+ let mut initial_holder_commitment_point = match self.unfunded_context.initial_holder_commitment_point {
12314
12314
Some(point) => point,
12315
12315
None => return Err((self, ChannelError::close("Received funding_created before our first commitment point was available".to_owned()))),
12316
12316
};
12317
- self.context.assert_no_commitment_advancement(holder_commitment_point .transaction_number(), "funding_created");
12317
+ self.context.assert_no_commitment_advancement(initial_holder_commitment_point .transaction_number(), "funding_created");
12318
12318
12319
12319
let funding_txo = OutPoint { txid: msg.funding_txid, index: msg.funding_output_index };
12320
12320
self.funding.channel_transaction_parameters.funding_outpoint = Some(funding_txo);
12321
12321
12322
12322
let (channel_monitor, counterparty_initial_commitment_tx) = match self.initial_commitment_signed(
12323
12323
ChannelId::v1_from_funding_outpoint(funding_txo), msg.signature,
12324
- &mut holder_commitment_point , best_block, signer_provider, logger
12324
+ &mut initial_holder_commitment_point , best_block, signer_provider, logger
12325
12325
) {
12326
12326
Ok(channel_monitor) => channel_monitor,
12327
12327
Err(err) => return Err((self, err)),
@@ -12341,7 +12341,7 @@ where
12341
12341
pending_funding: vec![],
12342
12342
context: self.context,
12343
12343
interactive_tx_signing_session: None,
12344
- holder_commitment_point,
12344
+ holder_commitment_point: initial_holder_commitment_point ,
12345
12345
#[cfg(splicing)]
12346
12346
pending_splice: None,
12347
12347
};
@@ -12358,10 +12358,10 @@ where
12358
12358
pub fn signer_maybe_unblocked<L: Deref>(
12359
12359
&mut self, logger: &L
12360
12360
) -> Option<msgs::AcceptChannel> where L::Target: Logger {
12361
- if self.unfunded_context.holder_commitment_point .is_none() {
12362
- self.unfunded_context.holder_commitment_point = HolderCommitmentPoint::new(&self.context.holder_signer, &self.context.secp_ctx);
12361
+ if self.unfunded_context.initial_holder_commitment_point .is_none() {
12362
+ self.unfunded_context.initial_holder_commitment_point = HolderCommitmentPoint::new(&self.context.holder_signer, &self.context.secp_ctx);
12363
12363
}
12364
- if let Some(ref mut point) = self.unfunded_context.holder_commitment_point {
12364
+ if let Some(ref mut point) = self.unfunded_context.initial_holder_commitment_point {
12365
12365
if !point.can_advance() {
12366
12366
point.try_resolve_pending(&self.context.holder_signer, &self.context.secp_ctx, logger);
12367
12367
}
@@ -12442,7 +12442,7 @@ where
12442
12442
)?;
12443
12443
let unfunded_context = UnfundedChannelContext {
12444
12444
unfunded_channel_age_ticks: 0,
12445
- holder_commitment_point : HolderCommitmentPoint::new(&context.holder_signer, &context.secp_ctx),
12445
+ initial_holder_commitment_point : HolderCommitmentPoint::new(&context.holder_signer, &context.secp_ctx),
12446
12446
};
12447
12447
let funding_negotiation_context = FundingNegotiationContext {
12448
12448
is_initiator: true,
@@ -12637,7 +12637,7 @@ where
12637
12637
12638
12638
let unfunded_context = UnfundedChannelContext {
12639
12639
unfunded_channel_age_ticks: 0,
12640
- holder_commitment_point : HolderCommitmentPoint::new(&context.holder_signer, &context.secp_ctx),
12640
+ initial_holder_commitment_point : HolderCommitmentPoint::new(&context.holder_signer, &context.secp_ctx),
12641
12641
};
12642
12642
Ok(Self {
12643
12643
funding,
0 commit comments