We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7e2a0dc commit 6c58a73Copy full SHA for 6c58a73
lightning/src/ln/channelmonitor.rs
@@ -2017,9 +2017,9 @@ impl<ChanSigner: ChannelKeys> ChannelMonitor<ChanSigner> {
2017
/// Checks if a given transaction spends any watched outputs.
2018
fn spends_watched_output(&self, tx: &Transaction) -> bool {
2019
for input in tx.input.iter() {
2020
- for (txid, outputs) in self.get_outputs_to_watch().iter() {
+ if let Some(outputs) = self.get_outputs_to_watch().get(&input.previous_output.txid) {
2021
for (idx, _script_pubkey) in outputs.iter().enumerate() {
2022
- if txid == &input.previous_output.txid && idx == input.previous_output.vout as usize {
+ if idx == input.previous_output.vout as usize {
2023
return true;
2024
}
2025
0 commit comments