mirror of
https://github.com/bitcoinresearchkit/brk.git
synced 2026-07-03 15:23:41 -07:00
global: snapshot
This commit is contained in:
@@ -13,7 +13,7 @@ impl Vecs {
|
||||
exit: &Exit,
|
||||
) -> Result<()> {
|
||||
// Block count raw + cumulative
|
||||
self.total.raw.height.compute_range(
|
||||
self.total.base.height.compute_range(
|
||||
starting_indexes.height,
|
||||
&indexer.vecs.blocks.weight,
|
||||
|h| (h, StoredU32::from(1_u32)),
|
||||
|
||||
@@ -5,7 +5,7 @@ use vecdb::Database;
|
||||
use super::Vecs;
|
||||
use crate::{
|
||||
indexes,
|
||||
internal::{BlockCountTarget, CachedWindowStarts, ComputedPerBlockCumulativeWithSums, ConstantVecs},
|
||||
internal::{BlockCountTarget, CachedWindowStarts, PerBlockCumulativeWithSums, ConstantVecs},
|
||||
};
|
||||
|
||||
impl Vecs {
|
||||
@@ -21,7 +21,7 @@ impl Vecs {
|
||||
version,
|
||||
indexes,
|
||||
),
|
||||
total: ComputedPerBlockCumulativeWithSums::forced_import(
|
||||
total: PerBlockCumulativeWithSums::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::{ComputedPerBlockCumulativeWithSums, ConstantVecs};
|
||||
use crate::internal::{PerBlockCumulativeWithSums, ConstantVecs};
|
||||
|
||||
#[derive(Traversable)]
|
||||
pub struct Vecs<M: StorageMode = Rw> {
|
||||
pub target: ConstantVecs<StoredU64>,
|
||||
pub total: ComputedPerBlockCumulativeWithSums<StoredU32, StoredU64, M>,
|
||||
pub total: PerBlockCumulativeWithSums<StoredU32, StoredU64, M>,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user