]> git.bitcoin.ninja Git - rust-lightning/commitdiff
Remove redundant field names
authorGabriel Comte <gabriel.comte@gmail.com>
Tue, 11 Oct 2022 22:14:01 +0000 (00:14 +0200)
committerGabriel Comte <gabriel.comte@gmail.com>
Tue, 11 Oct 2022 22:35:22 +0000 (00:35 +0200)
lightning/src/chain/channelmonitor.rs
lightning/src/ln/channelmanager.rs
lightning/src/ln/functional_test_utils.rs
lightning/src/routing/router.rs

index 8f8cbdf448adb80d7fa50ee279c86862c1d0abd6..7d119d85fff417223d338fae0937df507c2e5430 100644 (file)
@@ -2826,7 +2826,7 @@ impl<Signer: Sign> ChannelMonitorImpl<Signer> {
                                        self.onchain_events_awaiting_threshold_conf.push(OnchainEventEntry {
                                                txid,
                                                transaction: Some((*tx).clone()),
-                                               height: height,
+                                               height,
                                                event: OnchainEvent::FundingSpendConfirmation {
                                                        on_local_output_csv: balance_spendable_csv,
                                                        commitment_tx_to_counterparty_output,
@@ -3418,7 +3418,7 @@ impl<Signer: Sign> ChannelMonitorImpl<Signer> {
                        let entry = OnchainEventEntry {
                                txid: tx.txid(),
                                transaction: Some(tx.clone()),
-                               height: height,
+                               height,
                                event: OnchainEvent::MaturingOutput { descriptor: spendable_output.clone() },
                        };
                        log_info!(logger, "Received spendable output {}, spendable at height {}", log_spendable!(spendable_output), entry.confirmation_threshold());
index f234ad9f91f555075804d87db115d98193f09619..95771449ba47b1cf5e2001bf9e17b90b88776690 100644 (file)
@@ -1971,7 +1971,7 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
                log_debug!(self.logger, "Finishing force-closure of channel with {} HTLCs to fail", failed_htlcs.len());
                for htlc_source in failed_htlcs.drain(..) {
                        let (source, payment_hash, counterparty_node_id, channel_id) = htlc_source;
-                       let receiver = HTLCDestination::NextHopChannel { node_id: Some(counterparty_node_id), channel_id: channel_id };
+                       let receiver = HTLCDestination::NextHopChannel { node_id: Some(counterparty_node_id), channel_id };
                        self.fail_htlc_backwards_internal(source, &payment_hash, HTLCFailReason::Reason { failure_code: 0x4000 | 8, data: Vec::new() }, receiver);
                }
                if let Some((funding_txo, monitor_update)) = monitor_update_option {
@@ -3862,7 +3862,7 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
                                                                }
                                                        } else {
                                                                events::Event::ProbeFailed {
-                                                                       payment_id: payment_id,
+                                                                       payment_id,
                                                                        payment_hash: payment_hash.clone(),
                                                                        path: path.clone(),
                                                                        short_channel_id,
@@ -3909,7 +3909,7 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
 
                                                if self.payment_is_probe(payment_hash, &payment_id) {
                                                        events::Event::ProbeFailed {
-                                                               payment_id: payment_id,
+                                                               payment_id,
                                                                payment_hash: payment_hash.clone(),
                                                                path: path.clone(),
                                                                short_channel_id: Some(scid),
@@ -6499,7 +6499,7 @@ impl Readable for HTLCSource {
                                }
                                Ok(HTLCSource::OutboundRoute {
                                        session_priv: session_priv.0.unwrap(),
-                                       first_hop_htlc_msat: first_hop_htlc_msat,
+                                       first_hop_htlc_msat,
                                        path: path.unwrap(),
                                        payment_id: payment_id.unwrap(),
                                        payment_secret,
index 43dfef5d188bc51d8d0aa65df6965ef9ccaf7b1a..c3a57791c08b079840ea704989e4d1a616969f32 100644 (file)
@@ -1126,7 +1126,7 @@ impl SendEvent {
                assert!(updates.update_fail_htlcs.is_empty());
                assert!(updates.update_fail_malformed_htlcs.is_empty());
                assert!(updates.update_fee.is_none());
-               SendEvent { node_id: node_id, msgs: updates.update_add_htlcs, commitment_msg: updates.commitment_signed }
+               SendEvent { node_id, msgs: updates.update_add_htlcs, commitment_msg: updates.commitment_signed }
        }
 
        pub fn from_event(event: MessageSendEvent) -> SendEvent {
index efba350ce2743f816c39e6c20698a15c3e222454..170ac9c991c43b3f4b079a026bd388801a6ca12d 100644 (file)
@@ -1153,7 +1153,7 @@ where L::Target: Logger {
                                                                lowest_fee_to_peer_through_node: total_fee_msat,
                                                                lowest_fee_to_node: $next_hops_fee_msat as u64 + hop_use_fee_msat,
                                                                total_cltv_delta: hop_total_cltv_delta,
-                                                               value_contribution_msat: value_contribution_msat,
+                                                               value_contribution_msat,
                                                                path_htlc_minimum_msat,
                                                                path_penalty_msat,
                                                                path_length_to_node,