global: snapshot

This commit is contained in:
nym21
2026-01-10 18:43:18 +01:00
parent 3bc0615000
commit 6f45ec13f3
311 changed files with 6916 additions and 7664 deletions

View File

@@ -4,19 +4,18 @@ use brk_types::{Height, OutputType, Sats, TxOutIndex};
use vecdb::{AnyStoredVec, AnyVec, Exit, GenericStoredVec, TypedVecIterator, VecIndex};
use super::Vecs;
use crate::{ComputeIndexes, indexes, price};
use crate::{ComputeIndexes, indexes};
impl Vecs {
pub fn compute(
&mut self,
indexer: &Indexer,
indexes: &indexes::Vecs,
price: Option<&price::Vecs>,
starting_indexes: &ComputeIndexes,
exit: &Exit,
) -> Result<()> {
self.opreturn
.compute_all(indexes, price, starting_indexes, exit, |height_vec| {
.compute_all(indexes, starting_indexes, 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,22 +3,22 @@ use brk_types::Version;
use vecdb::Database;
use super::Vecs;
use crate::{indexes, internal::ValueBlockFull};
use crate::{indexes, internal::ValueFromHeightFull, price};
impl Vecs {
pub fn forced_import(
db: &Database,
version: Version,
indexes: &indexes::Vecs,
compute_dollars: bool,
price: Option<&price::Vecs>,
) -> Result<Self> {
Ok(Self {
opreturn: ValueBlockFull::forced_import(
opreturn: ValueFromHeightFull::forced_import(
db,
"opreturn_value",
version,
indexes,
compute_dollars,
price,
)?,
})
}

View File

@@ -1,8 +1,8 @@
use brk_traversable::Traversable;
use crate::internal::ValueBlockFull;
use crate::internal::ValueFromHeightFull;
#[derive(Clone, Traversable)]
pub struct Vecs {
pub opreturn: ValueBlockFull,
pub opreturn: ValueFromHeightFull,
}