mirror of
https://github.com/bitcoinresearchkit/brk.git
synced 2026-07-14 12:38:13 -07:00
global: snapshot part 4
This commit is contained in:
@@ -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,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>,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user