global: snapshot

This commit is contained in:
nym21
2026-01-11 17:19:00 +01:00
parent 6f45ec13f3
commit ea70c381de
419 changed files with 38059 additions and 7653 deletions

View File

@@ -5,14 +5,14 @@ use vecdb::Database;
use super::Vecs;
use crate::{
indexes,
internal::{ComputedFromHeightFull, TxDerivedFull},
internal::{ComputedFromHeightLast, TxDerivedFull},
};
impl Vecs {
pub fn forced_import(db: &Database, version: Version, indexes: &indexes::Vecs) -> Result<Self> {
Ok(Self {
total_count: TxDerivedFull::forced_import(db, "output_count", version, indexes)?,
utxo_count: ComputedFromHeightFull::forced_import(db, "exact_utxo_count", version, indexes)?,
utxo_count: ComputedFromHeightLast::forced_import(db, "exact_utxo_count", version, indexes)?,
})
}
}

View File

@@ -1,10 +1,10 @@
use brk_traversable::Traversable;
use brk_types::StoredU64;
use crate::internal::{ComputedFromHeightFull, TxDerivedFull};
use crate::internal::{ComputedFromHeightLast, TxDerivedFull};
#[derive(Clone, Traversable)]
pub struct Vecs {
pub total_count: TxDerivedFull<StoredU64>,
pub utxo_count: ComputedFromHeightFull<StoredU64>,
pub utxo_count: ComputedFromHeightLast<StoredU64>,
}