@@ -2670,7 +2670,7 @@ where
2670
2670
is_batch_funding: Option<()>,
2671
2671
2672
2672
counterparty_next_commitment_point: Option<PublicKey>,
2673
- counterparty_prev_commitment_point : Option<PublicKey>,
2673
+ counterparty_current_commitment_point : Option<PublicKey>,
2674
2674
counterparty_node_id: PublicKey,
2675
2675
2676
2676
counterparty_shutdown_scriptpubkey: Option<ScriptBuf>,
@@ -3298,7 +3298,7 @@ where
3298
3298
is_batch_funding: None,
3299
3299
3300
3300
counterparty_next_commitment_point: Some(open_channel_fields.first_per_commitment_point),
3301
- counterparty_prev_commitment_point : None,
3301
+ counterparty_current_commitment_point : None,
3302
3302
counterparty_node_id,
3303
3303
3304
3304
counterparty_shutdown_scriptpubkey,
@@ -3536,7 +3536,7 @@ where
3536
3536
is_batch_funding: None,
3537
3537
3538
3538
counterparty_next_commitment_point: None,
3539
- counterparty_prev_commitment_point : None,
3539
+ counterparty_current_commitment_point : None,
3540
3540
counterparty_node_id,
3541
3541
3542
3542
counterparty_shutdown_scriptpubkey: None,
@@ -5614,7 +5614,7 @@ where
5614
5614
// Use the previous commitment number and point when splicing since they shouldn't change.
5615
5615
if commitment_number != INITIAL_COMMITMENT_NUMBER {
5616
5616
commitment_number += 1;
5617
- commitment_point = self.counterparty_prev_commitment_point .unwrap();
5617
+ commitment_point = self.counterparty_current_commitment_point .unwrap();
5618
5618
}
5619
5619
5620
5620
let commitment_data = self.build_commitment_transaction(
@@ -6782,9 +6782,9 @@ where
6782
6782
self.context.counterparty_next_commitment_point
6783
6783
} else if self.context.counterparty_next_commitment_transaction_number == INITIAL_COMMITMENT_NUMBER - 2 {
6784
6784
// If we've advanced the commitment number once, the second commitment point is
6785
- // at `counterparty_prev_commitment_point `, which is not yet revoked.
6786
- debug_assert!(self.context.counterparty_prev_commitment_point .is_some());
6787
- self.context.counterparty_prev_commitment_point
6785
+ // at `counterparty_current_commitment_point `, which is not yet revoked.
6786
+ debug_assert!(self.context.counterparty_current_commitment_point .is_some());
6787
+ self.context.counterparty_current_commitment_point
6788
6788
} else {
6789
6789
// If they have sent updated points, channel_ready is always supposed to match
6790
6790
// their "first" point, which we re-derive here.
@@ -6798,7 +6798,7 @@ where
6798
6798
return Ok(None);
6799
6799
}
6800
6800
6801
- self.context.counterparty_prev_commitment_point = self.context.counterparty_next_commitment_point;
6801
+ self.context.counterparty_current_commitment_point = self.context.counterparty_next_commitment_point;
6802
6802
self.context.counterparty_next_commitment_point = Some(msg.next_per_commitment_point);
6803
6803
// Clear any interactive signing session.
6804
6804
self.interactive_tx_signing_session = None;
@@ -7028,7 +7028,7 @@ where
7028
7028
.build_commitment_transaction(
7029
7029
pending_splice_funding,
7030
7030
self.context.counterparty_next_commitment_transaction_number + 1,
7031
- &self.context.counterparty_prev_commitment_point .unwrap(),
7031
+ &self.context.counterparty_current_commitment_point .unwrap(),
7032
7032
false,
7033
7033
false,
7034
7034
logger,
@@ -7615,11 +7615,11 @@ where
7615
7615
"Peer provided an invalid per_commitment_secret".to_owned()
7616
7616
);
7617
7617
7618
- if let Some(counterparty_prev_commitment_point ) =
7619
- self.context.counterparty_prev_commitment_point
7618
+ if let Some(counterparty_current_commitment_point ) =
7619
+ self.context.counterparty_current_commitment_point
7620
7620
{
7621
7621
if PublicKey::from_secret_key(&self.context.secp_ctx, &secret)
7622
- != counterparty_prev_commitment_point
7622
+ != counterparty_current_commitment_point
7623
7623
{
7624
7624
return Err(ChannelError::close("Got a revoke commitment secret which didn't correspond to their current pubkey".to_owned()));
7625
7625
}
@@ -7687,7 +7687,7 @@ where
7687
7687
// channel based on that, but stepping stuff here should be safe either way.
7688
7688
self.context.channel_state.clear_awaiting_remote_revoke();
7689
7689
self.mark_response_received();
7690
- self.context.counterparty_prev_commitment_point =
7690
+ self.context.counterparty_current_commitment_point =
7691
7691
self.context.counterparty_next_commitment_point;
7692
7692
self.context.counterparty_next_commitment_point = Some(msg.next_per_commitment_point);
7693
7693
self.context.counterparty_next_commitment_transaction_number -= 1;
@@ -13168,7 +13168,7 @@ where
13168
13168
self.funding.funding_transaction.write(writer)?;
13169
13169
13170
13170
self.context.counterparty_next_commitment_point.write(writer)?;
13171
- self.context.counterparty_prev_commitment_point .write(writer)?;
13171
+ self.context.counterparty_current_commitment_point .write(writer)?;
13172
13172
self.context.counterparty_node_id.write(writer)?;
13173
13173
13174
13174
self.context.counterparty_shutdown_scriptpubkey.write(writer)?;
@@ -13570,7 +13570,7 @@ where
13570
13570
13571
13571
let counterparty_next_commitment_point = Readable::read(reader)?;
13572
13572
13573
- let counterparty_prev_commitment_point = Readable::read(reader)?;
13573
+ let counterparty_current_commitment_point = Readable::read(reader)?;
13574
13574
let counterparty_node_id = Readable::read(reader)?;
13575
13575
13576
13576
let counterparty_shutdown_scriptpubkey = Readable::read(reader)?;
@@ -14026,7 +14026,7 @@ where
14026
14026
is_batch_funding,
14027
14027
14028
14028
counterparty_next_commitment_point,
14029
- counterparty_prev_commitment_point ,
14029
+ counterparty_current_commitment_point ,
14030
14030
counterparty_node_id,
14031
14031
14032
14032
counterparty_shutdown_scriptpubkey,
0 commit comments