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

View File

@@ -6,7 +6,7 @@ use super::Vecs;
use crate::{
indexes,
internal::{
AmountPerBlockCumulative, AmountPerBlockCumulativeWithSums, AmountPerBlockFull,
AmountPerBlockCumulative, AmountPerBlockCumulativeRolling, AmountPerBlockFull,
CachedWindowStarts, FiatPerBlock, LazyPercentRollingWindows, OneMinusBp16,
PercentPerBlock, PercentRollingWindows, RatioRollingWindows,
},
@@ -33,10 +33,10 @@ impl Vecs {
);
Ok(Self {
coinbase: AmountPerBlockCumulativeWithSums::forced_import(
coinbase: AmountPerBlockCumulativeRolling::forced_import(
db, "coinbase", version, indexes, cached_starts,
)?,
subsidy: AmountPerBlockCumulativeWithSums::forced_import(
subsidy: AmountPerBlockCumulativeRolling::forced_import(
db, "subsidy", version, indexes, cached_starts,
)?,
fees: AmountPerBlockFull::forced_import(db, "fees", version, indexes, cached_starts)?,

View File

@@ -3,15 +3,15 @@ use brk_types::{BasisPoints16, BasisPoints32, Cents};
use vecdb::{Rw, StorageMode};
use crate::internal::{
AmountPerBlockCumulative, AmountPerBlockCumulativeWithSums, AmountPerBlockFull,
AmountPerBlockCumulative, AmountPerBlockCumulativeRolling, AmountPerBlockFull,
FiatPerBlock, LazyPercentRollingWindows, PercentPerBlock, PercentRollingWindows,
RatioRollingWindows,
};
#[derive(Traversable)]
pub struct Vecs<M: StorageMode = Rw> {
pub coinbase: AmountPerBlockCumulativeWithSums<M>,
pub subsidy: AmountPerBlockCumulativeWithSums<M>,
pub coinbase: AmountPerBlockCumulativeRolling<M>,
pub subsidy: AmountPerBlockCumulativeRolling<M>,
pub fees: AmountPerBlockFull<M>,
pub unclaimed: AmountPerBlockCumulative<M>,
#[traversable(wrap = "fees", rename = "dominance")]