@@ -1452,7 +1452,7 @@ where
1452
1452
/// channel_value_satoshis, output_script
1453
1453
/// );
1454
1454
/// match channel_manager.funding_transaction_generated(
1455
- /// & temporary_channel_id, & counterparty_node_id, funding_transaction
1455
+ /// temporary_channel_id, counterparty_node_id, funding_transaction
1456
1456
/// ) {
1457
1457
/// Ok(()) => println!("Funding channel {}", temporary_channel_id),
1458
1458
/// Err(e) => println!("Error funding channel {}: {:?}", temporary_channel_id, e),
@@ -4444,17 +4444,17 @@ where
4444
4444
/// Handles the generation of a funding transaction, optionally (for tests) with a function
4445
4445
/// which checks the correctness of the funding transaction given the associated channel.
4446
4446
fn funding_transaction_generated_intern<FundingOutput: FnMut(&OutboundV1Channel<SP>) -> Result<OutPoint, &'static str>>(
4447
- &self, temporary_channel_id: & ChannelId, counterparty_node_id: & PublicKey, funding_transaction: Transaction, is_batch_funding: bool,
4447
+ &self, temporary_channel_id: ChannelId, counterparty_node_id: PublicKey, funding_transaction: Transaction, is_batch_funding: bool,
4448
4448
mut find_funding_output: FundingOutput, is_manual_broadcast: bool,
4449
4449
) -> Result<(), APIError> {
4450
4450
let per_peer_state = self.per_peer_state.read().unwrap();
4451
- let peer_state_mutex = per_peer_state.get(counterparty_node_id)
4451
+ let peer_state_mutex = per_peer_state.get(& counterparty_node_id)
4452
4452
.ok_or_else(|| APIError::ChannelUnavailable { err: format!("Can't find a peer matching the passed counterparty node_id {}", counterparty_node_id) })?;
4453
4453
4454
4454
let mut peer_state_lock = peer_state_mutex.lock().unwrap();
4455
4455
let peer_state = &mut *peer_state_lock;
4456
4456
let funding_txo;
4457
- let (mut chan, msg_opt) = match peer_state.channel_by_id.remove(temporary_channel_id) {
4457
+ let (mut chan, msg_opt) = match peer_state.channel_by_id.remove(& temporary_channel_id) {
4458
4458
Some(ChannelPhase::UnfundedOutboundV1(mut chan)) => {
4459
4459
macro_rules! close_chan { ($err: expr, $api_err: expr, $chan: expr) => { {
4460
4460
let counterparty;
@@ -4490,7 +4490,7 @@ where
4490
4490
}
4491
4491
},
4492
4492
Some(phase) => {
4493
- peer_state.channel_by_id.insert(* temporary_channel_id, phase);
4493
+ peer_state.channel_by_id.insert(temporary_channel_id, phase);
4494
4494
return Err(APIError::APIMisuseError {
4495
4495
err: format!(
4496
4496
"Channel with id {} for the passed counterparty node_id {} is not an unfunded, outbound V1 channel",
@@ -4540,7 +4540,7 @@ where
4540
4540
}
4541
4541
4542
4542
#[cfg(test)]
4543
- pub(crate) fn funding_transaction_generated_unchecked(&self, temporary_channel_id: & ChannelId, counterparty_node_id: & PublicKey, funding_transaction: Transaction, output_index: u16) -> Result<(), APIError> {
4543
+ pub(crate) fn funding_transaction_generated_unchecked(&self, temporary_channel_id: ChannelId, counterparty_node_id: PublicKey, funding_transaction: Transaction, output_index: u16) -> Result<(), APIError> {
4544
4544
let txid = funding_transaction.txid();
4545
4545
self.funding_transaction_generated_intern(temporary_channel_id, counterparty_node_id, funding_transaction, false, |_| {
4546
4546
Ok(OutPoint { txid, index: output_index })
@@ -4577,8 +4577,8 @@ where
4577
4577
///
4578
4578
/// [`Event::FundingGenerationReady`]: crate::events::Event::FundingGenerationReady
4579
4579
/// [`Event::ChannelClosed`]: crate::events::Event::ChannelClosed
4580
- pub fn funding_transaction_generated(&self, temporary_channel_id: & ChannelId, counterparty_node_id: & PublicKey, funding_transaction: Transaction) -> Result<(), APIError> {
4581
- self.batch_funding_transaction_generated(&[(temporary_channel_id, counterparty_node_id)], funding_transaction)
4580
+ pub fn funding_transaction_generated(&self, temporary_channel_id: ChannelId, counterparty_node_id: PublicKey, funding_transaction: Transaction) -> Result<(), APIError> {
4581
+ self.batch_funding_transaction_generated(&[(& temporary_channel_id, & counterparty_node_id)], funding_transaction)
4582
4582
}
4583
4583
4584
4584
@@ -4609,10 +4609,10 @@ where
4609
4609
/// [`Event::FundingTxBroadcastSafe`]: crate::events::Event::FundingTxBroadcastSafe
4610
4610
/// [`Event::ChannelClosed`]: crate::events::Event::ChannelClosed
4611
4611
/// [`ChannelManager::funding_transaction_generated`]: crate::ln::channelmanager::ChannelManager::funding_transaction_generated
4612
- pub fn unsafe_manual_funding_transaction_generated(&self, temporary_channel_id: & ChannelId, counterparty_node_id: & PublicKey, funding: OutPoint) -> Result<(), APIError> {
4612
+ pub fn unsafe_manual_funding_transaction_generated(&self, temporary_channel_id: ChannelId, counterparty_node_id: PublicKey, funding: OutPoint) -> Result<(), APIError> {
4613
4613
let _persistence_guard = PersistenceNotifierGuard::notify_on_drop(self);
4614
4614
4615
- let temporary_channels = &[(temporary_channel_id, counterparty_node_id)];
4615
+ let temporary_channels = &[(& temporary_channel_id, & counterparty_node_id)];
4616
4616
return self.batch_funding_transaction_generated_intern(temporary_channels, FundingType::Unchecked(funding));
4617
4617
4618
4618
}
@@ -4686,8 +4686,8 @@ where
4686
4686
let is_manual_broadcast = funding.is_manual_broadcast();
4687
4687
for &(temporary_channel_id, counterparty_node_id) in temporary_channels {
4688
4688
result = result.and_then(|_| self.funding_transaction_generated_intern(
4689
- temporary_channel_id,
4690
- counterparty_node_id,
4689
+ * temporary_channel_id,
4690
+ * counterparty_node_id,
4691
4691
funding.transaction_or_dummy(),
4692
4692
is_batch_funding,
4693
4693
|chan| {
0 commit comments