@@ -4195,17 +4195,17 @@ where
4195
4195
4196
4196
#[rustfmt::skip]
4197
4197
fn validate_commitment_signed<L: Deref>(
4198
- &self, funding: &FundingScope, holder_commitment_point: &HolderCommitmentPoint ,
4198
+ &self, funding: &FundingScope, transaction_number: u64, commitment_point: PublicKey ,
4199
4199
msg: &msgs::CommitmentSigned, logger: &L,
4200
4200
) -> Result<(HolderCommitmentTransaction, Vec<(HTLCOutputInCommitment, Option<&HTLCSource>)>), ChannelError>
4201
4201
where
4202
4202
L::Target: Logger,
4203
4203
{
4204
4204
let funding_script = funding.get_funding_redeemscript();
4205
4205
4206
- let commitment_data = self.build_commitment_transaction(funding,
4207
- holder_commitment_point.next_transaction_number(), &holder_commitment_point.next_point() ,
4208
- true, false, logger );
4206
+ let commitment_data = self.build_commitment_transaction(
4207
+ funding, transaction_number, &commitment_point, true, false, logger ,
4208
+ );
4209
4209
let commitment_txid = {
4210
4210
let trusted_tx = commitment_data.tx.trust();
4211
4211
let bitcoin_tx = trusted_tx.built_transaction();
@@ -7003,9 +7003,15 @@ where
7003
7003
})
7004
7004
.and_then(|funding_negotiation| funding_negotiation.as_funding())
7005
7005
.expect("Funding must exist for negotiated pending splice");
7006
+ let transaction_number = self.holder_commitment_point.current_transaction_number();
7007
+ let commitment_point = self
7008
+ .holder_commitment_point
7009
+ .current_point()
7010
+ .expect("current should be set after receiving the initial commitment_signed");
7006
7011
let (holder_commitment_tx, _) = self.context.validate_commitment_signed(
7007
7012
pending_splice_funding,
7008
- &self.holder_commitment_point,
7013
+ transaction_number,
7014
+ commitment_point,
7009
7015
msg,
7010
7016
logger,
7011
7017
)?;
@@ -7089,9 +7095,17 @@ where
7089
7095
));
7090
7096
}
7091
7097
7098
+ let transaction_number = self.holder_commitment_point.next_transaction_number();
7099
+ let commitment_point = self.holder_commitment_point.next_point();
7092
7100
let update = self
7093
7101
.context
7094
- .validate_commitment_signed(&self.funding, &self.holder_commitment_point, msg, logger)
7102
+ .validate_commitment_signed(
7103
+ &self.funding,
7104
+ transaction_number,
7105
+ commitment_point,
7106
+ msg,
7107
+ logger,
7108
+ )
7095
7109
.map(|(commitment_tx, htlcs_included)| {
7096
7110
let (nondust_htlc_sources, dust_htlcs) =
7097
7111
Self::get_commitment_htlc_data(&htlcs_included);
@@ -7153,9 +7167,12 @@ where
7153
7167
funding_txid
7154
7168
))
7155
7169
})?;
7170
+ let transaction_number = self.holder_commitment_point.next_transaction_number();
7171
+ let commitment_point = self.holder_commitment_point.next_point();
7156
7172
let (commitment_tx, htlcs_included) = self.context.validate_commitment_signed(
7157
7173
funding,
7158
- &self.holder_commitment_point,
7174
+ transaction_number,
7175
+ commitment_point,
7159
7176
msg,
7160
7177
logger,
7161
7178
)?;
0 commit comments