]> git.bitcoin.ninja Git - rust-lightning/commitdiff
Format HashMap::insert call
authorJeffrey Czyz <jkczyz@gmail.com>
Fri, 24 May 2024 15:54:26 +0000 (10:54 -0500)
committerJeffrey Czyz <jkczyz@gmail.com>
Fri, 24 May 2024 16:30:55 +0000 (11:30 -0500)
lightning/src/ln/channelmanager.rs

index f2b3bf15d39608f93d08774c43306cc31f102ac5..834f84c4b9bf536e7d061adc2e644a6328f79b34 100644 (file)
@@ -6326,10 +6326,16 @@ where
 
                                let htlcs = payment.htlcs.iter().map(events::ClaimedHTLC::from).collect();
                                let sender_intended_value = payment.htlcs.first().map(|htlc| htlc.total_msat);
-                               let dup_purpose = claimable_payments.pending_claiming_payments.insert(payment_hash,
-                                       ClaimingPayment { amount_msat: payment.htlcs.iter().map(|source| source.value).sum(),
-                                       payment_purpose: payment.purpose, receiver_node_id, htlcs, sender_intended_value
-                               });
+                               let dup_purpose = claimable_payments.pending_claiming_payments.insert(
+                                       payment_hash,
+                                       ClaimingPayment {
+                                               amount_msat: payment.htlcs.iter().map(|source| source.value).sum(),
+                                               payment_purpose: payment.purpose,
+                                               receiver_node_id,
+                                               htlcs,
+                                               sender_intended_value,
+                                       },
+                               );
                                if dup_purpose.is_some() {
                                        debug_assert!(false, "Shouldn't get a duplicate pending claim event ever");
                                        log_error!(self.logger, "Got a duplicate pending claimable event on payment hash {}! Please report this bug",