Skip to content

Commit

Permalink
f Filter once, simplify spend_spendable_outputs
Browse files Browse the repository at this point in the history
  • Loading branch information
tnull committed Nov 1, 2023
1 parent a7a979c commit d476470
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions src/sweep.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
}
Expand Down

0 comments on commit d476470

Please sign in to comment.