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
@@ -3,7 +3,7 @@ use brk_types::Version;
use vecdb::Database;
use super::Vecs;
use crate::{indexes, internal::{AmountPerBlockCumulativeWithSums, CachedWindowStarts}};
use crate::{indexes, internal::{AmountPerBlockCumulativeRolling, CachedWindowStarts}};
impl Vecs {
pub(crate) fn forced_import(
@@ -13,7 +13,7 @@ impl Vecs {
cached_starts: &CachedWindowStarts,
) -> Result<Self> {
Ok(Self {
total: AmountPerBlockCumulativeWithSums::forced_import(
total: AmountPerBlockCumulativeRolling::forced_import(
db,
"unspendable_supply",
version,
@@ -1,10 +1,10 @@
use brk_traversable::Traversable;
use vecdb::{Rw, StorageMode};
use crate::internal::AmountPerBlockCumulativeWithSums;
use crate::internal::AmountPerBlockCumulativeRolling;
#[derive(Traversable)]
#[traversable(transparent)]
pub struct Vecs<M: StorageMode = Rw> {
pub total: AmountPerBlockCumulativeWithSums<M>,
pub total: AmountPerBlockCumulativeRolling<M>,
}