Skip to content

Commit

Permalink
Remove unused errs Vec when claiming payments
Browse files Browse the repository at this point in the history
The errs Vec in ChannelManager::claim_payment_internal hasn't been
populated since commit fea6393. Drop it
along with the code that consumed it.
  • Loading branch information
jkczyz committed Nov 21, 2024
1 parent c8bbcff commit 770e161
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions lightning/src/ln/channelmanager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6915,7 +6915,6 @@ where
let mut prev_total_msat = None;
let mut expected_amt_msat = None;
let mut valid_mpp = true;
let mut errs = Vec::new();
let per_peer_state = self.per_peer_state.read().unwrap();
for htlc in sources.iter() {
if prev_total_msat.is_some() && prev_total_msat != Some(htlc.total_msat) {
Expand Down Expand Up @@ -7002,12 +7001,6 @@ where
}
self.claimable_payments.lock().unwrap().pending_claiming_payments.remove(&payment_hash);
}

// Now we can handle any errors which were generated.
for (counterparty_node_id, err) in errs.drain(..) {
let res: Result<(), _> = Err(err);
let _ = handle_error!(self, res, counterparty_node_id);
}
}

fn claim_funds_from_hop<
Expand Down

0 comments on commit 770e161

Please sign in to comment.