diff --git a/crates/core/app/src/action_handler/transaction.rs b/crates/core/app/src/action_handler/transaction.rs index e454895f40..b8d2bb15a9 100644 --- a/crates/core/app/src/action_handler/transaction.rs +++ b/crates/core/app/src/action_handler/transaction.rs @@ -4,6 +4,7 @@ use anyhow::Result; use async_trait::async_trait; use cnidarium::{StateRead, StateWrite}; use penumbra_sct::{component::source::SourceContext, CommitmentSource}; +use penumbra_shielded_pool::component::ClueManager; use penumbra_transaction::Transaction; use tokio::task::JoinSet; use tracing::{instrument, Instrument}; @@ -105,6 +106,18 @@ impl AppActionHandler for Transaction { // Delete the note source, in case someone else tries to read it. state.put_current_source(None); + // Record all the clues in this transaction + // To avoid recomputing a hash. + let id = self.id(); + for clue in self + .transaction_body + .detection_data + .iter() + .flat_map(|x| x.fmd_clues.iter()) + { + state.record_clue(clue.clone(), id.clone()).await?; + } + Ok(()) } }