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

@@ -5,14 +5,14 @@ use vecdb::Database;
use super::Vecs;
use crate::{
indexes,
internal::{ComputedBlockFull, DerivedTxFull},
internal::{ComputedFromHeightFull, TxDerivedFull},
};
impl Vecs {
pub fn forced_import(db: &Database, version: Version, indexes: &indexes::Vecs) -> Result<Self> {
Ok(Self {
total_count: DerivedTxFull::forced_import(db, "output_count", version, indexes)?,
utxo_count: ComputedBlockFull::forced_import(db, "exact_utxo_count", version, indexes)?,
total_count: TxDerivedFull::forced_import(db, "output_count", version, indexes)?,
utxo_count: ComputedFromHeightFull::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::{ComputedBlockFull, DerivedTxFull};
use crate::internal::{ComputedFromHeightFull, TxDerivedFull};
#[derive(Clone, Traversable)]
pub struct Vecs {
pub total_count: DerivedTxFull<StoredU64>,
pub utxo_count: ComputedBlockFull<StoredU64>,
pub total_count: TxDerivedFull<StoredU64>,
pub utxo_count: ComputedFromHeightFull<StoredU64>,
}