@@ -2172,6 +2172,7 @@ impl FundingScope {
2172
2172
let post_value_to_self_msat = post_value_to_self_msat_signed as u64;
2173
2173
2174
2174
let prev_funding_txid = prev_funding.get_funding_txid();
2175
+ // Update the splicing 'tweak', this will rotate the keys in the signer
2175
2176
let holder_pubkeys = match &context.holder_signer {
2176
2177
ChannelSignerType::Ecdsa(ecdsa) => ecdsa.pubkeys(prev_funding_txid, &context.secp_ctx),
2177
2178
// TODO (taproot|arik)
@@ -2190,7 +2191,6 @@ impl FundingScope {
2190
2191
channel_type_features: channel_parameters.channel_type_features.clone(),
2191
2192
channel_value_satoshis: post_channel_value,
2192
2193
};
2193
- // Update the splicing 'tweak', this will rotate the keys in the signer
2194
2194
if let Some(ref mut counterparty_parameters) =
2195
2195
post_channel_transaction_parameters.counterparty_parameters
2196
2196
{
@@ -2853,6 +2853,8 @@ where
2853
2853
SP::Target: SignerProvider,
2854
2854
{
2855
2855
context: &'a mut ChannelContext<SP>,
2856
+ /// The funding scope being (re)negotiated.
2857
+ /// In case of splicing it is the new spliced scope.
2856
2858
funding: &'a mut FundingScope,
2857
2859
funding_negotiation_context: &'a mut FundingNegotiationContext,
2858
2860
interactive_tx_constructor: &'a mut Option<InteractiveTxConstructor>,
@@ -3102,8 +3104,6 @@ where
3102
3104
let commitment_signed = self.context.get_initial_commitment_signed(&self.funding, logger);
3103
3105
let commitment_signed = match commitment_signed {
3104
3106
Ok(commitment_signed) => {
3105
- self.funding
3106
- .funding_transaction = Some(signing_session.unsigned_tx().build_unsigned_tx());
3107
3107
commitment_signed
3108
3108
},
3109
3109
Err(err) => {
@@ -6193,28 +6193,17 @@ where
6193
6193
fn as_renegotiating_channel(&mut self) -> Result<NegotiatingChannelView<SP>, &'static str> {
6194
6194
if let Some(ref mut pending_splice) = &mut self.pending_splice {
6195
6195
if let Some(ref mut funding) = &mut pending_splice.funding_scope {
6196
- if pending_splice.funding_negotiation_context.our_funding_satoshis != 0
6197
- || pending_splice
6198
- .funding_negotiation_context
6199
- .their_funding_satoshis
6200
- .unwrap_or_default() != 0
6201
- {
6202
- Ok(NegotiatingChannelView {
6203
- context: &mut self.context,
6204
- funding,
6205
- funding_negotiation_context: &mut pending_splice
6206
- .funding_negotiation_context,
6207
- interactive_tx_constructor: &mut pending_splice.interactive_tx_constructor,
6208
- interactive_tx_signing_session: &mut pending_splice
6209
- .interactive_tx_signing_session,
6210
- holder_commitment_transaction_number: self
6211
- .holder_commitment_point
6212
- .transaction_number(),
6213
- })
6214
- } else {
6215
- Err("Received unexpected interactive transaction negotiation message: \
6216
- the channel is splicing, but splice_init/splice_ack has not been exchanged yet")
6217
- }
6196
+ Ok(NegotiatingChannelView {
6197
+ context: &mut self.context,
6198
+ funding,
6199
+ funding_negotiation_context: &mut pending_splice.funding_negotiation_context,
6200
+ interactive_tx_constructor: &mut pending_splice.interactive_tx_constructor,
6201
+ interactive_tx_signing_session: &mut pending_splice
6202
+ .interactive_tx_signing_session,
6203
+ holder_commitment_transaction_number: self
6204
+ .holder_commitment_point
6205
+ .transaction_number(),
6206
+ })
6218
6207
} else {
6219
6208
Err("Received unexpected interactive transaction negotiation message: \
6220
6209
the channel is splicing, but splice_init/splice_ack has not been exchanged yet")
@@ -10247,9 +10236,9 @@ where
10247
10236
// Convert inputs
10248
10237
let mut funding_inputs = Vec::new();
10249
10238
for (tx_in, tx, _w) in our_funding_inputs.into_iter() {
10250
- let tx16 = TransactionU16LenLimited::new(tx.clone() )
10239
+ let tx16 = TransactionU16LenLimited::new(tx)
10251
10240
.map_err(|_e| APIError::APIMisuseError { err: format!("Too large transaction") })?;
10252
- funding_inputs.push((tx_in.clone() , tx16));
10241
+ funding_inputs.push((tx_in, tx16));
10253
10242
}
10254
10243
10255
10244
let funding_negotiation_context = FundingNegotiationContext {
0 commit comments