global: snapshot

This commit is contained in:
nym21
2026-03-13 16:27:10 +01:00
parent b2a1251774
commit 3709ceff8e
168 changed files with 2007 additions and 2008 deletions
@@ -13,7 +13,7 @@ impl Vecs {
exit: &Exit,
) -> Result<()> {
// Block count raw + cumulative
self.total.raw.height.compute_range(
self.total.base.height.compute_range(
starting_indexes.height,
&indexer.vecs.blocks.weight,
|h| (h, StoredU32::from(1_u32)),
@@ -5,7 +5,7 @@ use vecdb::Database;
use super::Vecs;
use crate::{
indexes,
internal::{BlockCountTarget, CachedWindowStarts, ComputedPerBlockCumulativeWithSums, ConstantVecs},
internal::{BlockCountTarget, CachedWindowStarts, PerBlockCumulativeWithSums, ConstantVecs},
};
impl Vecs {
@@ -21,7 +21,7 @@ impl Vecs {
version,
indexes,
),
total: ComputedPerBlockCumulativeWithSums::forced_import(
total: PerBlockCumulativeWithSums::forced_import(
db,
"block_count",
version + Version::ONE,
+2 -2
View File
@@ -2,10 +2,10 @@ use brk_traversable::Traversable;
use brk_types::{StoredU32, StoredU64};
use vecdb::{Rw, StorageMode};
use crate::internal::{ComputedPerBlockCumulativeWithSums, ConstantVecs};
use crate::internal::{PerBlockCumulativeWithSums, ConstantVecs};
#[derive(Traversable)]
pub struct Vecs<M: StorageMode = Rw> {
pub target: ConstantVecs<StoredU64>,
pub total: ComputedPerBlockCumulativeWithSums<StoredU32, StoredU64, M>,
pub total: PerBlockCumulativeWithSums<StoredU32, StoredU64, M>,
}