From 77b60f3a30d684ee035413c53ca494acef16d78e Mon Sep 17 00:00:00 2001 From: Henry de Valence Date: Fri, 20 Nov 2020 15:18:20 -0800 Subject: [PATCH] state: add traces for utxo scanning --- zebra-state/src/service/utxo.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/zebra-state/src/service/utxo.rs b/zebra-state/src/service/utxo.rs index 8f4736ad..4ade4c53 100644 --- a/zebra-state/src/service/utxo.rs +++ b/zebra-state/src/service/utxo.rs @@ -37,6 +37,9 @@ impl PendingUtxos { /// by the given `transparent::OutPoint` that the `Output` has arrived. pub fn respond(&mut self, outpoint: transparent::OutPoint, output: transparent::Output) { if let Some(sender) = self.0.remove(&outpoint) { + // Adding the outpoint as a field lets us crossreference + // with the trace of the verification that made the request. + tracing::trace!(?outpoint, "found pending UTXO"); let _ = sender.send(output); } } @@ -48,6 +51,7 @@ impl PendingUtxos { return; } + tracing::trace!("scanning new block for pending UTXOs"); for transaction in block.transactions.iter() { let transaction_hash = transaction.hash(); for (index, output) in transaction.outputs().iter().enumerate() {