mirror of
https://github.com/bitcoinresearchkit/brk.git
synced 2026-07-03 23:33:40 -07:00
global: snapshot
This commit is contained in:
@@ -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>,
|
||||
|
||||
Reference in New Issue
Block a user