global: snapshot

This commit is contained in:
nym21
2026-03-03 22:10:05 +01:00
parent 28f6b0f18b
commit 269c1d5fdf
99 changed files with 1565 additions and 1146 deletions

View File

@@ -1,15 +1,15 @@
use brk_traversable::Traversable;
use brk_types::{DifficultyEpoch, StoredF32, StoredF64, StoredU32};
use brk_types::{BasisPointsSigned32, DifficultyEpoch, StoredF32, StoredF64, StoredU32};
use vecdb::{Rw, StorageMode};
use crate::internal::{ComputedFromHeight, ComputedHeightDerived};
use crate::internal::{ComputedFromHeight, ComputedHeightDerived, PercentFromHeight};
/// Difficulty metrics: raw difficulty, derived stats, adjustment, and countdown
#[derive(Traversable)]
pub struct Vecs<M: StorageMode = Rw> {
pub raw: ComputedHeightDerived<StoredF64>,
pub as_hash: ComputedFromHeight<StoredF64, M>,
pub adjustment: ComputedFromHeight<StoredF32, M>,
pub adjustment: PercentFromHeight<BasisPointsSigned32, M>,
pub epoch: ComputedFromHeight<DifficultyEpoch, M>,
pub blocks_before_next_adjustment: ComputedFromHeight<StoredU32, M>,
pub days_before_next_adjustment: ComputedFromHeight<StoredF32, M>,