global: snapshot

This commit is contained in:
nym21
2026-03-18 21:04:08 +01:00
parent 24f344c0b1
commit 92e1a0ccaf
39 changed files with 819 additions and 1912 deletions

View File

@@ -3,7 +3,7 @@ use brk_indexer::Indexer;
use brk_types::Indexes;
use vecdb::Exit;
use crate::{outputs, prices};
use crate::prices;
use super::Vecs;
@@ -11,20 +11,15 @@ impl Vecs {
pub(crate) fn compute(
&mut self,
indexer: &Indexer,
outputs: &outputs::Vecs,
prices: &prices::Vecs,
starting_indexes: &Indexes,
exit: &Exit,
) -> Result<()> {
self.count
.compute(indexer, starting_indexes, exit)?;
self.count.compute(indexer, starting_indexes, exit)?;
self.value
.compute(indexer, prices, starting_indexes, exit)?;
self.adoption
.compute(&self.count, &outputs.count, starting_indexes, exit)?;
let _lock = exit.lock();
self.db.compact()?;
Ok(())