computer: simplified a bunch of things

This commit is contained in:
nym21
2026-02-26 19:37:22 +01:00
parent 9e4fe62de2
commit cccaf6b206
252 changed files with 3788 additions and 7279 deletions

View File

@@ -4,17 +4,22 @@ use brk_types::{Height, OutputType, Sats, TxOutIndex};
use vecdb::{AnyStoredVec, AnyVec, Exit, ReadableVec, WritableVec, VecIndex};
use super::Vecs;
use crate::ComputeIndexes;
use crate::{ComputeIndexes, blocks, prices};
impl Vecs {
pub(crate) fn compute(
&mut self,
indexer: &Indexer,
count_vecs: &blocks::CountVecs,
prices: &prices::Vecs,
starting_indexes: &ComputeIndexes,
exit: &Exit,
) -> Result<()> {
let window_starts = count_vecs.window_starts();
self.opreturn
.compute(starting_indexes, exit, |height_vec| {
.compute(starting_indexes.height, &window_starts, prices, exit, |height_vec| {
// Validate computed versions against dependencies
let dep_version = indexer.vecs.outputs.first_txoutindex.version()
+ indexer.vecs.outputs.outputtype.version()

View File

@@ -3,14 +3,13 @@ use brk_types::Version;
use vecdb::Database;
use super::Vecs;
use crate::{indexes, internal::ValueFromHeightFull, prices};
use crate::{indexes, internal::ValueFromHeightFull};
impl Vecs {
pub(crate) fn forced_import(
db: &Database,
version: Version,
indexes: &indexes::Vecs,
prices: &prices::Vecs,
) -> Result<Self> {
Ok(Self {
opreturn: ValueFromHeightFull::forced_import(
@@ -18,7 +17,6 @@ impl Vecs {
"opreturn_value",
version,
indexes,
prices,
)?,
})
}