Merge pull request #535 from TheBlueMatt/2020-03-462-nits
[rust-lightning] / lightning / src / ln / channelmonitor.rs
index ea9e7851e647afc385b3d789c300e18d72f8bace..205f4b011ac0fb32d62304f5bf1e3ceadbbf2ca1 100644 (file)
@@ -2010,7 +2010,7 @@ impl<ChanSigner: ChannelKeys> ChannelMonitor<ChanSigner> {
                                                                watch_outputs.push(new_outputs);
                                                        }
                                                }
-                                               claimable_outpoints.push(new_outpoints);
+                                               claimable_outpoints.append(&mut new_outpoints);
                                        }
                                        if !funding_txo.is_none() && claimable_outpoints.is_empty() {
                                                if let Some(spendable_output) = self.check_spend_closing_transaction(&tx) {
@@ -2020,7 +2020,7 @@ impl<ChanSigner: ChannelKeys> ChannelMonitor<ChanSigner> {
                                } else {
                                        if let Some(&(commitment_number, _)) = self.remote_commitment_txn_on_chain.get(&prevout.txid) {
                                                let mut new_outpoints = self.check_spend_remote_htlc(&tx, commitment_number, height);
-                                               claimable_outpoints.push(new_outpoints);
+                                               claimable_outpoints.append(&mut new_outpoints);
                                        }
                                }
                        }