global: snapshot

This commit is contained in:
nym21
2026-03-02 13:34:45 +01:00
parent 7cb1bfa667
commit 4d97cec869
57 changed files with 1724 additions and 2011 deletions
@@ -1,6 +1,6 @@
use brk_error::Result;
use brk_indexer::Indexer;
use brk_types::{StoredF32, StoredU32};
use brk_types::{StoredF64, StoredU32};
use vecdb::Exit;
use super::super::TARGET_BLOCKS_PER_DAY_F32;
@@ -22,7 +22,7 @@ impl Vecs {
self.as_hash.height.compute_transform(
starting_indexes.height,
&indexer.vecs.blocks.difficulty,
|(i, v, ..)| (i, StoredF32::from(*v * multiplier)),
|(i, v, ..)| (i, StoredF64::from(*v * multiplier)),
exit,
)?;
@@ -8,7 +8,7 @@ use crate::internal::{ComputedFromHeight, ComputedHeightDerived};
#[derive(Traversable)]
pub struct Vecs<M: StorageMode = Rw> {
pub raw: ComputedHeightDerived<StoredF64>,
pub as_hash: ComputedFromHeight<StoredF32, M>,
pub as_hash: ComputedFromHeight<StoredF64, M>,
pub adjustment: ComputedFromHeight<StoredF32, M>,
pub epoch: ComputedFromHeight<DifficultyEpoch, M>,
pub blocks_before_next_adjustment: ComputedFromHeight<StoredU32, M>,