global: snapshot part 4

This commit is contained in:
nym21
2026-03-20 14:27:10 +01:00
parent 1d671ea41f
commit 8f93ff9f68
47 changed files with 683 additions and 637 deletions
@@ -7,7 +7,7 @@ use crate::{
indexes,
internal::{
BlockCountTarget24h, BlockCountTarget1w, BlockCountTarget1m, BlockCountTarget1y,
CachedWindowStarts, PerBlockCumulativeWithSums, ConstantVecs, Windows,
CachedWindowStarts, PerBlockCumulativeRolling, ConstantVecs, Windows,
},
};
@@ -25,7 +25,7 @@ impl Vecs {
_1m: ConstantVecs::new::<BlockCountTarget1m>("block_count_target_1m", version, indexes),
_1y: ConstantVecs::new::<BlockCountTarget1y>("block_count_target_1y", version, indexes),
},
total: PerBlockCumulativeWithSums::forced_import(
total: PerBlockCumulativeRolling::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::{PerBlockCumulativeWithSums, ConstantVecs, Windows};
use crate::internal::{PerBlockCumulativeRolling, ConstantVecs, Windows};
#[derive(Traversable)]
pub struct Vecs<M: StorageMode = Rw> {
pub target: Windows<ConstantVecs<StoredU64>>,
pub total: PerBlockCumulativeWithSums<StoredU32, StoredU64, M>,
pub total: PerBlockCumulativeRolling<StoredU32, StoredU64, M>,
}