mirror of
https://github.com/bitcoinresearchkit/brk.git
synced 2026-07-29 03:38:10 -07:00
global: snapshot part 4
This commit is contained in:
@@ -5,7 +5,7 @@ use vecdb::Database;
|
||||
use super::Vecs;
|
||||
use crate::{
|
||||
indexes,
|
||||
internal::{CachedWindowStarts, PerBlockCumulativeWithSums},
|
||||
internal::{CachedWindowStarts, PerBlockCumulativeRolling},
|
||||
};
|
||||
|
||||
impl Vecs {
|
||||
@@ -16,28 +16,28 @@ impl Vecs {
|
||||
cached_starts: &CachedWindowStarts,
|
||||
) -> Result<Self> {
|
||||
Ok(Self {
|
||||
destroyed: PerBlockCumulativeWithSums::forced_import(
|
||||
destroyed: PerBlockCumulativeRolling::forced_import(
|
||||
db,
|
||||
"cointime_value_destroyed",
|
||||
version,
|
||||
indexes,
|
||||
cached_starts,
|
||||
)?,
|
||||
created: PerBlockCumulativeWithSums::forced_import(
|
||||
created: PerBlockCumulativeRolling::forced_import(
|
||||
db,
|
||||
"cointime_value_created",
|
||||
version,
|
||||
indexes,
|
||||
cached_starts,
|
||||
)?,
|
||||
stored: PerBlockCumulativeWithSums::forced_import(
|
||||
stored: PerBlockCumulativeRolling::forced_import(
|
||||
db,
|
||||
"cointime_value_stored",
|
||||
version,
|
||||
indexes,
|
||||
cached_starts,
|
||||
)?,
|
||||
vocdd: PerBlockCumulativeWithSums::forced_import(
|
||||
vocdd: PerBlockCumulativeRolling::forced_import(
|
||||
db,
|
||||
"vocdd",
|
||||
version + Version::ONE,
|
||||
|
||||
@@ -2,12 +2,12 @@ use brk_traversable::Traversable;
|
||||
use brk_types::StoredF64;
|
||||
use vecdb::{Rw, StorageMode};
|
||||
|
||||
use crate::internal::PerBlockCumulativeWithSums;
|
||||
use crate::internal::PerBlockCumulativeRolling;
|
||||
|
||||
#[derive(Traversable)]
|
||||
pub struct Vecs<M: StorageMode = Rw> {
|
||||
pub destroyed: PerBlockCumulativeWithSums<StoredF64, StoredF64, M>,
|
||||
pub created: PerBlockCumulativeWithSums<StoredF64, StoredF64, M>,
|
||||
pub stored: PerBlockCumulativeWithSums<StoredF64, StoredF64, M>,
|
||||
pub vocdd: PerBlockCumulativeWithSums<StoredF64, StoredF64, M>,
|
||||
pub destroyed: PerBlockCumulativeRolling<StoredF64, StoredF64, M>,
|
||||
pub created: PerBlockCumulativeRolling<StoredF64, StoredF64, M>,
|
||||
pub stored: PerBlockCumulativeRolling<StoredF64, StoredF64, M>,
|
||||
pub vocdd: PerBlockCumulativeRolling<StoredF64, StoredF64, M>,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user