mirror of
https://github.com/bitcoinresearchkit/brk.git
synced 2026-07-03 15:23:41 -07:00
global: snapshot
This commit is contained in:
@@ -162,8 +162,8 @@ impl Vecs {
|
||||
// Compute rolling window block counts (both block_count's own rolling + separate block_count_sum)
|
||||
let ws = WindowStarts {
|
||||
_24h: &self.height_24h_ago,
|
||||
_7d: &self.height_1w_ago,
|
||||
_30d: &self.height_1m_ago,
|
||||
_1w: &self.height_1w_ago,
|
||||
_1m: &self.height_1m_ago,
|
||||
_1y: &self.height_1y_ago,
|
||||
};
|
||||
self.block_count.sum.compute_rolling_sum(
|
||||
|
||||
@@ -59,12 +59,12 @@ pub struct Vecs<M: StorageMode = Rw> {
|
||||
}
|
||||
|
||||
impl Vecs {
|
||||
/// Get the standard 4 rolling window start heights (24h, 7d, 30d, 1y).
|
||||
/// Get the standard 4 rolling window start heights (24h, 1w, 1m, 1y).
|
||||
pub fn window_starts(&self) -> WindowStarts<'_> {
|
||||
WindowStarts {
|
||||
_24h: &self.height_24h_ago,
|
||||
_7d: &self.height_1w_ago,
|
||||
_30d: &self.height_1m_ago,
|
||||
_1w: &self.height_1w_ago,
|
||||
_1m: &self.height_1m_ago,
|
||||
_1y: &self.height_1y_ago,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user