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,7 +4,7 @@ use brk_types::{Height, StoredU64, Version};
use vecdb::{Database, IterableCloneableVec, VecIndex};
use super::Vecs;
use crate::{indexes, internal::{ComputedDerivedBlockFull, LazyBlockFullHeight}};
use crate::{indexes, internal::{ComputedHeightDerivedFull, LazyComputedFromHeightFull}};
impl Vecs {
pub fn forced_import(
@@ -14,7 +14,7 @@ impl Vecs {
indexes: &indexes::Vecs,
) -> Result<Self> {
Ok(Self {
vbytes: LazyBlockFullHeight::forced_import_with_init(
vbytes: LazyComputedFromHeightFull::forced_import_with_init(
db,
"block_vbytes",
version,
@@ -26,7 +26,7 @@ impl Vecs {
.map(|w| StoredU64::from(w.to_vbytes_floor()))
},
)?,
size: ComputedDerivedBlockFull::forced_import(
size: ComputedHeightDerivedFull::forced_import(
db,
"block_size",
indexer.vecs.blocks.total_size.boxed_clone(),

View File

@@ -1,10 +1,10 @@
use brk_traversable::Traversable;
use brk_types::{StoredU64, Weight};
use crate::internal::{ComputedDerivedBlockFull, LazyBlockFullHeight};
use crate::internal::{ComputedHeightDerivedFull, LazyComputedFromHeightFull};
#[derive(Clone, Traversable)]
pub struct Vecs {
pub vbytes: LazyBlockFullHeight<StoredU64, Weight>,
pub size: ComputedDerivedBlockFull<StoredU64>,
pub vbytes: LazyComputedFromHeightFull<StoredU64, Weight>,
pub size: ComputedHeightDerivedFull<StoredU64>,
}