From d4764701814b98d515c851cefb3789b1d3ed0af9 Mon Sep 17 00:00:00 2001 From: Elias Rohrer Date: Wed, 1 Nov 2023 13:39:19 +0100 Subject: [PATCH] f Filter once, simplify `spend_spendable_outputs` --- src/sweep.rs | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/sweep.rs b/src/sweep.rs index 4826c763a..f2f66f24b 100644 --- a/src/sweep.rs +++ b/src/sweep.rs @@ -286,7 +286,7 @@ where if height >= bcast_height + REGENERATE_SPEND_THRESHOLD { let output_descriptors = vec![output_info.descriptor.clone()]; match self.get_spending_tx(&output_descriptors, height) { - Ok(Some(spending_tx)) => { + Ok(spending_tx) => { if let Some(filter) = self.chain_source.as_ref() { if let Some(tx_out) = spending_tx.output.first() { filter.register_tx(&spending_tx.txid(), &tx_out.script_pubkey); @@ -305,13 +305,6 @@ where } } } - Ok(None) => { - log_debug!( - self.logger, - "Omitted spending static outputs: {:?}", - output_descriptors - ); - } Err(err) => { log_error!(self.logger, "Error spending outputs: {:?}", err); }