mirror of
https://github.com/bitcoinresearchkit/brk.git
synced 2026-04-24 06:39:58 -07:00
34 lines
876 B
Rust
34 lines
876 B
Rust
use brk_error::Result;
|
|
use brk_indexer::Indexer;
|
|
use brk_types::Indexes;
|
|
use vecdb::Exit;
|
|
|
|
use super::Vecs;
|
|
use crate::{blocks, indexes};
|
|
|
|
impl Vecs {
|
|
pub(crate) fn compute(
|
|
&mut self,
|
|
indexer: &Indexer,
|
|
indexes: &indexes::Vecs,
|
|
blocks: &blocks::Vecs,
|
|
starting_indexes: &Indexes,
|
|
exit: &Exit,
|
|
) -> Result<()> {
|
|
let window_starts = blocks.lookback.window_starts();
|
|
self.0
|
|
.compute(starting_indexes.height, &window_starts, exit, |full| {
|
|
full.compute_with_skip(
|
|
starting_indexes.height,
|
|
&indexes.txindex.input_count,
|
|
&indexer.vecs.transactions.first_txindex,
|
|
&indexes.height.txindex_count,
|
|
exit,
|
|
0,
|
|
)
|
|
})?;
|
|
|
|
Ok(())
|
|
}
|
|
}
|