@@ -4593,38 +4593,6 @@ impl<SP: Deref> ChannelContext<SP> where SP::Target: SignerProvider {
4593
4593
self.channel_transaction_parameters = channel_transaction_parameters;
4594
4594
self.get_initial_counterparty_commitment_signature(funding, logger)
4595
4595
}
4596
-
4597
- /// Get the splice message that can be sent during splice initiation.
4598
- #[cfg(splicing)]
4599
- pub fn get_splice_init(&self, our_funding_contribution_satoshis: i64,
4600
- funding_feerate_per_kw: u32, locktime: u32,
4601
- ) -> msgs::SpliceInit {
4602
- // TODO(splicing): The exisiting pubkey is reused, but a new one should be generated. See #3542.
4603
- // Note that channel_keys_id is supposed NOT to change
4604
- let funding_pubkey = self.get_holder_pubkeys().funding_pubkey.clone();
4605
- msgs::SpliceInit {
4606
- channel_id: self.channel_id,
4607
- funding_contribution_satoshis: our_funding_contribution_satoshis,
4608
- funding_feerate_per_kw,
4609
- locktime,
4610
- funding_pubkey,
4611
- require_confirmed_inputs: None,
4612
- }
4613
- }
4614
-
4615
- /// Get the splice_ack message that can be sent in response to splice initiation.
4616
- #[cfg(splicing)]
4617
- pub fn get_splice_ack(&self, our_funding_contribution_satoshis: i64) -> msgs::SpliceAck {
4618
- // TODO(splicing): The exisiting pubkey is reused, but a new one should be generated. See #3542.
4619
- // Note that channel_keys_id is supposed NOT to change
4620
- let funding_pubkey = self.get_holder_pubkeys().funding_pubkey;
4621
- msgs::SpliceAck {
4622
- channel_id: self.channel_id,
4623
- funding_contribution_satoshis: our_funding_contribution_satoshis,
4624
- funding_pubkey,
4625
- require_confirmed_inputs: None,
4626
- }
4627
- }
4628
4596
}
4629
4597
4630
4598
// Internal utility functions for channels
@@ -8487,10 +8455,28 @@ impl<SP: Deref> FundedChannel<SP> where
8487
8455
our_funding_contribution: our_funding_contribution_satoshis,
8488
8456
});
8489
8457
8490
- let msg = self.context. get_splice_init(our_funding_contribution_satoshis, funding_feerate_per_kw, locktime);
8458
+ let msg = self.get_splice_init(our_funding_contribution_satoshis, funding_feerate_per_kw, locktime);
8491
8459
Ok(msg)
8492
8460
}
8493
8461
8462
+ /// Get the splice message that can be sent during splice initiation.
8463
+ #[cfg(splicing)]
8464
+ pub fn get_splice_init(&self, our_funding_contribution_satoshis: i64,
8465
+ funding_feerate_per_kw: u32, locktime: u32,
8466
+ ) -> msgs::SpliceInit {
8467
+ // TODO(splicing): The exisiting pubkey is reused, but a new one should be generated. See #3542.
8468
+ // Note that channel_keys_id is supposed NOT to change
8469
+ let funding_pubkey = self.context.get_holder_pubkeys().funding_pubkey.clone();
8470
+ msgs::SpliceInit {
8471
+ channel_id: self.context.channel_id,
8472
+ funding_contribution_satoshis: our_funding_contribution_satoshis,
8473
+ funding_feerate_per_kw,
8474
+ locktime,
8475
+ funding_pubkey,
8476
+ require_confirmed_inputs: None,
8477
+ }
8478
+ }
8479
+
8494
8480
/// Handle splice_init
8495
8481
#[cfg(splicing)]
8496
8482
pub fn splice_init(&mut self, msg: &msgs::SpliceInit) -> Result<msgs::SpliceAck, ChannelError> {
@@ -8534,11 +8520,25 @@ impl<SP: Deref> FundedChannel<SP> where
8534
8520
// TODO(splicing): Store msg.funding_pubkey
8535
8521
// TODO(splicing): Apply start of splice (splice_start)
8536
8522
8537
- let splice_ack_msg = self.context. get_splice_ack(our_funding_contribution_satoshis);
8523
+ let splice_ack_msg = self.get_splice_ack(our_funding_contribution_satoshis);
8538
8524
// TODO(splicing): start interactive funding negotiation
8539
8525
Ok(splice_ack_msg)
8540
8526
}
8541
8527
8528
+ /// Get the splice_ack message that can be sent in response to splice initiation.
8529
+ #[cfg(splicing)]
8530
+ pub fn get_splice_ack(&self, our_funding_contribution_satoshis: i64) -> msgs::SpliceAck {
8531
+ // TODO(splicing): The exisiting pubkey is reused, but a new one should be generated. See #3542.
8532
+ // Note that channel_keys_id is supposed NOT to change
8533
+ let funding_pubkey = self.context.get_holder_pubkeys().funding_pubkey;
8534
+ msgs::SpliceAck {
8535
+ channel_id: self.context.channel_id,
8536
+ funding_contribution_satoshis: our_funding_contribution_satoshis,
8537
+ funding_pubkey,
8538
+ require_confirmed_inputs: None,
8539
+ }
8540
+ }
8541
+
8542
8542
/// Handle splice_ack
8543
8543
#[cfg(splicing)]
8544
8544
pub fn splice_ack(&mut self, msg: &msgs::SpliceAck) -> Result<(), ChannelError> {
0 commit comments