@@ -2199,6 +2199,7 @@ impl FundingScope {
2199
2199
let post_value_to_self_msat = post_value_to_self_msat_signed as u64;
2200
2200
2201
2201
let prev_funding_txid = prev_funding.get_funding_txid();
2202
+ // Update the splicing 'tweak', this will rotate the keys in the signer
2202
2203
let holder_pubkeys = match &context.holder_signer {
2203
2204
ChannelSignerType::Ecdsa(ecdsa) => ecdsa.pubkeys(prev_funding_txid, &context.secp_ctx),
2204
2205
// TODO (taproot|arik)
@@ -2217,7 +2218,6 @@ impl FundingScope {
2217
2218
channel_type_features: channel_parameters.channel_type_features.clone(),
2218
2219
channel_value_satoshis: post_channel_value,
2219
2220
};
2220
- // Update the splicing 'tweak', this will rotate the keys in the signer
2221
2221
if let Some(ref mut counterparty_parameters) =
2222
2222
post_channel_transaction_parameters.counterparty_parameters
2223
2223
{
@@ -2880,6 +2880,8 @@ where
2880
2880
SP::Target: SignerProvider,
2881
2881
{
2882
2882
context: &'a mut ChannelContext<SP>,
2883
+ /// The funding scope being (re)negotiated.
2884
+ /// In case of splicing it is the new spliced scope.
2883
2885
funding: &'a mut FundingScope,
2884
2886
funding_negotiation_context: &'a mut FundingNegotiationContext,
2885
2887
interactive_tx_constructor: &'a mut Option<InteractiveTxConstructor>,
@@ -3129,8 +3131,6 @@ where
3129
3131
let commitment_signed = self.context.get_initial_commitment_signed(&self.funding, logger);
3130
3132
let commitment_signed = match commitment_signed {
3131
3133
Ok(commitment_signed) => {
3132
- self.funding
3133
- .funding_transaction = Some(signing_session.unsigned_tx().build_unsigned_tx());
3134
3134
commitment_signed
3135
3135
},
3136
3136
Err(err) => {
@@ -6226,29 +6226,18 @@ where
6226
6226
#[cfg(splicing)]
6227
6227
fn as_renegotiating_channel(&mut self) -> Result<NegotiatingChannelView<SP>, &'static str> {
6228
6228
if let Some(ref mut pending_splice) = &mut self.pending_splice {
6229
- if let Some(ref mut funding) = &mut pending_splice.funding {
6230
- if pending_splice.funding_negotiation_context.our_funding_satoshis != 0
6231
- || pending_splice
6232
- .funding_negotiation_context
6233
- .their_funding_satoshis
6234
- .unwrap_or_default() != 0
6235
- {
6236
- Ok(NegotiatingChannelView {
6237
- context: &mut self.context,
6238
- funding,
6239
- funding_negotiation_context: &mut pending_splice
6240
- .funding_negotiation_context,
6241
- interactive_tx_constructor: &mut pending_splice.interactive_tx_constructor,
6242
- interactive_tx_signing_session: &mut pending_splice
6243
- .interactive_tx_signing_session,
6244
- holder_commitment_transaction_number: self
6245
- .holder_commitment_point
6246
- .transaction_number(),
6247
- })
6248
- } else {
6249
- Err("Received unexpected interactive transaction negotiation message: \
6250
- the channel is splicing, but splice_init/splice_ack has not been exchanged yet")
6251
- }
6229
+ if let Some(ref mut funding) = &mut pending_splice.funding_scope {
6230
+ Ok(NegotiatingChannelView {
6231
+ context: &mut self.context,
6232
+ funding,
6233
+ funding_negotiation_context: &mut pending_splice.funding_negotiation_context,
6234
+ interactive_tx_constructor: &mut pending_splice.interactive_tx_constructor,
6235
+ interactive_tx_signing_session: &mut pending_splice
6236
+ .interactive_tx_signing_session,
6237
+ holder_commitment_transaction_number: self
6238
+ .holder_commitment_point
6239
+ .transaction_number(),
6240
+ })
6252
6241
} else {
6253
6242
Err("Received unexpected interactive transaction negotiation message: \
6254
6243
the channel is splicing, but splice_init/splice_ack has not been exchanged yet")
@@ -10478,9 +10467,9 @@ where
10478
10467
// Convert inputs
10479
10468
let mut funding_inputs = Vec::new();
10480
10469
for (tx_in, tx, _w) in our_funding_inputs.into_iter() {
10481
- let tx16 = TransactionU16LenLimited::new(tx.clone() )
10470
+ let tx16 = TransactionU16LenLimited::new(tx)
10482
10471
.map_err(|_e| APIError::APIMisuseError { err: format!("Too large transaction") })?;
10483
- funding_inputs.push((tx_in.clone() , tx16));
10472
+ funding_inputs.push((tx_in, tx16));
10484
10473
}
10485
10474
10486
10475
let funding_negotiation_context = FundingNegotiationContext {
0 commit comments