global: snapshot

This commit is contained in:
nym21
2026-03-08 12:06:55 +01:00
parent 6bb5c63db7
commit 7f1f6044dc
8 changed files with 226 additions and 21 deletions

View File

@@ -268,11 +268,8 @@ pub(crate) fn process_blocks(
};
// Process outputs, inputs, and tick-tock in parallel via rayon::join
let (_, oi_result) = rayon::join(
|| {
vecs.utxo_cohorts
.tick_tock_next_block(chain_state, timestamp);
},
let (matured, oi_result) = rayon::join(
|| vecs.utxo_cohorts.tick_tock_next_block(chain_state, timestamp),
|| -> Result<_> {
let (outputs_result, inputs_result) = rayon::join(
|| {
@@ -355,6 +352,9 @@ pub(crate) fn process_blocks(
timestamp,
});
// Record maturation (sats crossing age boundaries)
vecs.utxo_cohorts.push_maturation(height, &matured)?;
// Build set of addresses that received this block (for detecting "both" in sent)
// Reuse pre-allocated hashsets: clear preserves capacity, avoiding reallocation
received_addresses.values_mut().for_each(|set| set.clear());