computer: fix stateful

This commit is contained in:
nym21
2025-12-03 15:43:50 +01:00
parent f48ad577d3
commit fcc74ba212
8 changed files with 169 additions and 82 deletions

View File

@@ -703,6 +703,25 @@ impl Vecs {
Height::ZERO
};
// Import aggregate cohorts' price_to_amount
// We need to drop the borrows first to access utxo_cohorts directly
drop(separate_utxo_vecs);
drop(separate_address_vecs);
let starting_height = if starting_height.is_not_zero()
&& self
.utxo_cohorts
.import_aggregate_price_to_amount(starting_height)?
== starting_height
{
starting_height
} else {
Height::ZERO
};
// Re-collect the separate vecs
let mut separate_utxo_vecs =
self.utxo_cohorts.iter_separate_mut().collect::<Vec<_>>();
let mut separate_address_vecs =
self.address_cohorts.iter_separate_mut().collect::<Vec<_>>();
// info!("starting_height = {starting_height}");