Skip to content

Commit 661214e

Browse files
committed
f - s/previous/current
1 parent e9b88c3 commit 661214e

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

lightning/src/ln/channel.rs

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1850,7 +1850,7 @@ where
18501850
pending_funding: vec![],
18511851
context: chan.context,
18521852
interactive_tx_signing_session: chan.interactive_tx_signing_session,
1853-
previous_holder_commitment_point: None,
1853+
current_holder_commitment_point: None,
18541854
next_holder_commitment_point: initial_holder_commitment_point,
18551855
#[cfg(splicing)]
18561856
pending_splice: None,
@@ -6068,8 +6068,8 @@ where
60686068
/// This field is cleared once our counterparty sends a `channel_ready`.
60696069
pub interactive_tx_signing_session: Option<InteractiveTxSigningSession>,
60706070

6071-
/// The commitment point used for the previous commitment transaction.
6072-
previous_holder_commitment_point: Option<HolderCommitmentPoint>,
6071+
/// The commitment point used for the current holder commitment transaction.
6072+
current_holder_commitment_point: Option<HolderCommitmentPoint>,
60736073

60746074
/// The commitment point used for the next holder commitment transaction.
60756075
next_holder_commitment_point: HolderCommitmentPoint,
@@ -6957,7 +6957,7 @@ where
69576957

69586958
let (channel_monitor, _, next_holder_commitment_point) = self.initial_commitment_signed(
69596959
self.context.channel_id(), msg.signature, &holder_commitment_point, best_block, signer_provider, logger)?;
6960-
self.previous_holder_commitment_point = Some(holder_commitment_point);
6960+
self.current_holder_commitment_point = Some(holder_commitment_point);
69616961
self.next_holder_commitment_point = next_holder_commitment_point;
69626962

69636963
log_info!(logger, "Received initial commitment_signed from peer for channel {}", &self.context.channel_id());
@@ -7230,7 +7230,7 @@ where
72307230
debug_assert!(false, "We should be ready to advance our commitment point by the time we receive commitment_signed");
72317231
ChannelError::close("Failed to advance our commitment point".to_owned())
72327232
})?;
7233-
self.previous_holder_commitment_point = Some(self.next_holder_commitment_point);
7233+
self.current_holder_commitment_point = Some(self.next_holder_commitment_point);
72347234
self.next_holder_commitment_point = next_holder_commitment_point;
72357235

72367236
// Update state now that we've passed all the can-fail calls...
@@ -12066,7 +12066,7 @@ where
1206612066
pending_funding: vec![],
1206712067
context: self.context,
1206812068
interactive_tx_signing_session: None,
12069-
previous_holder_commitment_point: Some(initial_holder_commitment_point),
12069+
current_holder_commitment_point: Some(initial_holder_commitment_point),
1207012070
next_holder_commitment_point,
1207112071
#[cfg(splicing)]
1207212072
pending_splice: None,
@@ -12353,7 +12353,7 @@ where
1235312353
pending_funding: vec![],
1235412354
context: self.context,
1235512355
interactive_tx_signing_session: None,
12356-
previous_holder_commitment_point: Some(initial_holder_commitment_point),
12356+
current_holder_commitment_point: Some(initial_holder_commitment_point),
1235712357
next_holder_commitment_point,
1235812358
#[cfg(splicing)]
1235912359
pending_splice: None,
@@ -13873,17 +13873,17 @@ where
1387313873
},
1387413874
};
1387513875

13876-
let previous_holder_commitment_point = {
13877-
let previous_holder_commitment_transaction_number =
13876+
let current_holder_commitment_point = {
13877+
let current_holder_commitment_transaction_number =
1387813878
next_holder_commitment_point.transaction_number() + 1;
13879-
let previous_point = holder_signer
13880-
.get_per_commitment_point(previous_holder_commitment_transaction_number, &secp_ctx)
13879+
let point = holder_signer
13880+
.get_per_commitment_point(current_holder_commitment_transaction_number, &secp_ctx)
1388113881
.expect(
13882-
"Must be able to derive the previous commitment point upon channel restoration",
13882+
"Must be able to derive the current commitment point upon channel restoration",
1388313883
);
1388413884
Some(HolderCommitmentPoint {
13885-
transaction_number: previous_holder_commitment_transaction_number,
13886-
point: previous_point,
13885+
transaction_number: current_holder_commitment_transaction_number,
13886+
point,
1388713887
next_point: Some(next_holder_commitment_point.point()),
1388813888
})
1388913889
};
@@ -14025,7 +14025,7 @@ where
1402514025
is_holder_quiescence_initiator: None,
1402614026
},
1402714027
interactive_tx_signing_session,
14028-
previous_holder_commitment_point,
14028+
current_holder_commitment_point,
1402914029
next_holder_commitment_point,
1403014030
#[cfg(splicing)]
1403114031
pending_splice: None,

0 commit comments

Comments
 (0)