mirror of
https://github.com/bitcoinresearchkit/brk.git
synced 2026-07-03 23:33:40 -07:00
computer: snapshot
This commit is contained in:
@@ -37,7 +37,7 @@ impl Vecs {
|
||||
// Compute epoch by height
|
||||
self.epoch.height.compute_transform(
|
||||
starting_indexes.height,
|
||||
&indexes.height.difficulty,
|
||||
&indexes.height.epoch,
|
||||
|(h, epoch, ..)| (h, epoch),
|
||||
exit,
|
||||
)?;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
use brk_traversable::Traversable;
|
||||
use brk_types::{BasisPointsSigned32, DifficultyEpoch, StoredF32, StoredF64, StoredU32};
|
||||
use brk_types::{BasisPointsSigned32, Epoch, StoredF32, StoredF64, StoredU32};
|
||||
use vecdb::{Rw, StorageMode};
|
||||
|
||||
use crate::internal::{ComputedPerBlock, Resolutions, PercentPerBlock};
|
||||
@@ -8,7 +8,7 @@ pub struct Vecs<M: StorageMode = Rw> {
|
||||
pub raw: Resolutions<StoredF64>,
|
||||
pub as_hash: ComputedPerBlock<StoredF64, M>,
|
||||
pub adjustment: PercentPerBlock<BasisPointsSigned32, M>,
|
||||
pub epoch: ComputedPerBlock<DifficultyEpoch, M>,
|
||||
pub epoch: ComputedPerBlock<Epoch, M>,
|
||||
pub blocks_before_next_adjustment: ComputedPerBlock<StoredU32, M>,
|
||||
pub days_before_next_adjustment: ComputedPerBlock<StoredF32, M>,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user