mirror of
https://github.com/bitcoinresearchkit/brk.git
synced 2026-05-02 10:30:00 -07:00
global: snapshot
This commit is contained in:
@@ -58,13 +58,13 @@ impl Vecs {
|
||||
)?;
|
||||
|
||||
// Annualized volume: rolling 1y sum of per-block sent volume
|
||||
self.annualized_volume.sats.height.compute_rolling_sum(
|
||||
self.annualized.sats.height.compute_rolling_sum(
|
||||
starting_indexes.height,
|
||||
&blocks.lookback._1y,
|
||||
&self.sent_sum.sats,
|
||||
exit,
|
||||
)?;
|
||||
self.annualized_volume
|
||||
self.annualized
|
||||
.compute(prices, starting_indexes.height, exit)?;
|
||||
|
||||
self.tx_per_sec
|
||||
|
||||
@@ -23,7 +23,7 @@ impl Vecs {
|
||||
version,
|
||||
indexes,
|
||||
)?,
|
||||
annualized_volume: AmountPerBlock::forced_import(
|
||||
annualized: AmountPerBlock::forced_import(
|
||||
db,
|
||||
"annualized_volume",
|
||||
version,
|
||||
|
||||
@@ -8,7 +8,7 @@ use crate::internal::{AmountPerBlock, AmountPerBlockRolling, ComputedPerBlock};
|
||||
pub struct Vecs<M: StorageMode = Rw> {
|
||||
pub sent_sum: AmountPerBlockRolling<M>,
|
||||
pub received_sum: AmountPerBlockRolling<M>,
|
||||
pub annualized_volume: AmountPerBlock<M>,
|
||||
pub annualized: AmountPerBlock<M>,
|
||||
pub tx_per_sec: ComputedPerBlock<StoredF32, M>,
|
||||
pub outputs_per_sec: ComputedPerBlock<StoredF32, M>,
|
||||
pub inputs_per_sec: ComputedPerBlock<StoredF32, M>,
|
||||
|
||||
Reference in New Issue
Block a user