mirror of
https://github.com/bitcoinresearchkit/brk.git
synced 2026-04-25 23:29:58 -07:00
global: snapshot
This commit is contained in:
@@ -3,7 +3,7 @@ use brk_types::{Height, StoredU32, StoredU64};
|
||||
use vecdb::{EagerVec, PcoVec, Rw, StorageMode};
|
||||
|
||||
use crate::internal::{
|
||||
BlockWindowStarts, ComputedFromHeightCumulativeSum, ConstantVecs, RollingWindows, WindowStarts,
|
||||
ComputedFromHeightCumulativeSum, ConstantVecs, RollingWindows, WindowStarts,
|
||||
};
|
||||
|
||||
#[derive(Traversable)]
|
||||
@@ -56,14 +56,6 @@ impl Vecs {
|
||||
}
|
||||
}
|
||||
|
||||
/// Get the 2 block-count rolling window start heights (1h, 24h) for tx-derived metrics.
|
||||
pub fn block_window_starts(&self) -> BlockWindowStarts<'_> {
|
||||
BlockWindowStarts {
|
||||
_1h: &self.height_1h_ago,
|
||||
_24h: &self.height_24h_ago,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn start_vec(&self, days: usize) -> &EagerVec<PcoVec<Height, Height>> {
|
||||
match days {
|
||||
1 => &self.height_24h_ago,
|
||||
|
||||
Reference in New Issue
Block a user