Skip to content

Commit 8abf02c

Browse files
committed
Remove redundant field names
1 parent fdfd4f0 commit 8abf02c

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

lightning/src/chain/channelmonitor.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -2826,7 +2826,7 @@ impl<Signer: Sign> ChannelMonitorImpl<Signer> {
28262826
self.onchain_events_awaiting_threshold_conf.push(OnchainEventEntry {
28272827
txid,
28282828
transaction: Some((*tx).clone()),
2829-
height: height,
2829+
height,
28302830
event: OnchainEvent::FundingSpendConfirmation {
28312831
on_local_output_csv: balance_spendable_csv,
28322832
commitment_tx_to_counterparty_output,
@@ -3418,7 +3418,7 @@ impl<Signer: Sign> ChannelMonitorImpl<Signer> {
34183418
let entry = OnchainEventEntry {
34193419
txid: tx.txid(),
34203420
transaction: Some(tx.clone()),
3421-
height: height,
3421+
height,
34223422
event: OnchainEvent::MaturingOutput { descriptor: spendable_output.clone() },
34233423
};
34243424
log_info!(logger, "Received spendable output {}, spendable at height {}", log_spendable!(spendable_output), entry.confirmation_threshold());

lightning/src/ln/channelmanager.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -1971,7 +1971,7 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
19711971
log_debug!(self.logger, "Finishing force-closure of channel with {} HTLCs to fail", failed_htlcs.len());
19721972
for htlc_source in failed_htlcs.drain(..) {
19731973
let (source, payment_hash, counterparty_node_id, channel_id) = htlc_source;
1974-
let receiver = HTLCDestination::NextHopChannel { node_id: Some(counterparty_node_id), channel_id: channel_id };
1974+
let receiver = HTLCDestination::NextHopChannel { node_id: Some(counterparty_node_id), channel_id };
19751975
self.fail_htlc_backwards_internal(source, &payment_hash, HTLCFailReason::Reason { failure_code: 0x4000 | 8, data: Vec::new() }, receiver);
19761976
}
19771977
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
38623862
}
38633863
} else {
38643864
events::Event::ProbeFailed {
3865-
payment_id: payment_id,
3865+
payment_id,
38663866
payment_hash: payment_hash.clone(),
38673867
path: path.clone(),
38683868
short_channel_id,
@@ -3909,7 +3909,7 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
39093909

39103910
if self.payment_is_probe(payment_hash, &payment_id) {
39113911
events::Event::ProbeFailed {
3912-
payment_id: payment_id,
3912+
payment_id,
39133913
payment_hash: payment_hash.clone(),
39143914
path: path.clone(),
39153915
short_channel_id: Some(scid),
@@ -6499,7 +6499,7 @@ impl Readable for HTLCSource {
64996499
}
65006500
Ok(HTLCSource::OutboundRoute {
65016501
session_priv: session_priv.0.unwrap(),
6502-
first_hop_htlc_msat: first_hop_htlc_msat,
6502+
first_hop_htlc_msat,
65036503
path: path.unwrap(),
65046504
payment_id: payment_id.unwrap(),
65056505
payment_secret,

lightning/src/ln/functional_test_utils.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1126,7 +1126,7 @@ impl SendEvent {
11261126
assert!(updates.update_fail_htlcs.is_empty());
11271127
assert!(updates.update_fail_malformed_htlcs.is_empty());
11281128
assert!(updates.update_fee.is_none());
1129-
SendEvent { node_id: node_id, msgs: updates.update_add_htlcs, commitment_msg: updates.commitment_signed }
1129+
SendEvent { node_id, msgs: updates.update_add_htlcs, commitment_msg: updates.commitment_signed }
11301130
}
11311131

11321132
pub fn from_event(event: MessageSendEvent) -> SendEvent {

lightning/src/routing/router.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1153,7 +1153,7 @@ where L::Target: Logger {
11531153
lowest_fee_to_peer_through_node: total_fee_msat,
11541154
lowest_fee_to_node: $next_hops_fee_msat as u64 + hop_use_fee_msat,
11551155
total_cltv_delta: hop_total_cltv_delta,
1156-
value_contribution_msat: value_contribution_msat,
1156+
value_contribution_msat,
11571157
path_htlc_minimum_msat,
11581158
path_penalty_msat,
11591159
path_length_to_node,

0 commit comments

Comments
 (0)