global: snapshot

This commit is contained in:
nym21
2026-01-10 18:43:18 +01:00
parent 3bc0615000
commit 6f45ec13f3
311 changed files with 6916 additions and 7664 deletions

View File

@@ -1,12 +1,18 @@
use brk_traversable::Traversable;
use brk_types::{DifficultyEpoch, StoredF32, StoredU32};
use brk_types::{DifficultyEpoch, StoredF32, StoredF64, StoredU32};
use crate::internal::{ComputedBlockLast, ComputedDateLast};
use crate::internal::{
ComputedFromHeightLast, ComputedFromHeightSum, ComputedFromDateLast, ComputedHeightDerivedLast,
};
/// Difficulty epoch metrics and countdown
/// Difficulty metrics: raw difficulty, derived stats, adjustment, and countdown
#[derive(Clone, Traversable)]
pub struct Vecs {
pub epoch: ComputedDateLast<DifficultyEpoch>,
pub blocks_before_next_difficulty_adjustment: ComputedBlockLast<StoredU32>,
pub days_before_next_difficulty_adjustment: ComputedBlockLast<StoredF32>,
/// Raw difficulty with dateindex/period stats - merges with indexer's raw
pub raw: ComputedHeightDerivedLast<StoredF64>,
pub as_hash: ComputedFromHeightLast<StoredF32>,
pub adjustment: ComputedFromHeightSum<StoredF32>,
pub epoch: ComputedFromDateLast<DifficultyEpoch>,
pub blocks_before_next_adjustment: ComputedFromHeightLast<StoredU32>,
pub days_before_next_adjustment: ComputedFromHeightLast<StoredF32>,
}