global: snapshot part 8

This commit is contained in:
nym21
2026-03-21 09:31:10 +01:00
parent a7bbfda799
commit 147a3c7593
16 changed files with 1984 additions and 2252 deletions

View File

@@ -6,7 +6,7 @@ use vecdb::{DeltaAvg, LazyDeltaVec, LazyVecFrom1, ReadableCloneableVec};
use crate::{
indexes,
internal::{
CachedWindowStarts, DerivedResolutions, AvgCentsToUsd, AvgSatsToBtc, LazyPerBlock,
AvgCentsToUsd, AvgSatsToBtc, CachedWindowStarts, DerivedResolutions, LazyPerBlock,
LazyRollingAvgFromHeight, Resolutions, Windows,
},
};

View File

@@ -29,7 +29,6 @@ where
T: NumericValue + JsonSchema,
C: NumericValue + JsonSchema,
{
#[traversable(hidden)]
pub block: M::Stored<EagerVec<PcoVec<Height, T>>>,
pub cumulative: PerBlock<C, M>,
pub sum: LazyRollingSumsFromHeight<C>,

View File

@@ -10,7 +10,7 @@ use vecdb::{Database, EagerVec, Exit, ImportableVec, PcoVec, Rw, StorageMode};
use crate::{
indexes,
internal::{CachedWindowStarts, PerBlock, NumericValue, RollingComplete, WindowStarts},
internal::{CachedWindowStarts, NumericValue, PerBlock, RollingComplete, WindowStarts},
};
#[derive(Traversable)]
@@ -18,7 +18,6 @@ pub struct PerBlockFull<T, M: StorageMode = Rw>
where
T: NumericValue + JsonSchema,
{
#[traversable(hidden)]
pub block: M::Stored<EagerVec<PcoVec<Height, T>>>,
pub cumulative: PerBlock<T, M>,
#[traversable(flatten)]
@@ -71,8 +70,7 @@ where
self.cumulative
.height
.compute_cumulative(max_from, &self.block, exit)?;
self.rolling
.compute(max_from, windows, &self.block, exit)?;
self.rolling.compute(max_from, windows, &self.block, exit)?;
Ok(())
}
}

View File

@@ -19,7 +19,6 @@ pub struct PerBlockRollingAverage<T, M: StorageMode = Rw>
where
T: NumericValue + JsonSchema,
{
#[traversable(hidden)]
pub block: M::Stored<EagerVec<PcoVec<Height, T>>>,
#[traversable(hidden)]
pub cumulative: M::Stored<EagerVec<PcoVec<Height, T>>>,