mirror of
https://github.com/bitcoinresearchkit/brk.git
synced 2026-07-30 12:18:11 -07:00
global: snapshot
This commit is contained in:
@@ -190,10 +190,10 @@ impl Vecs {
|
||||
exit,
|
||||
)?;
|
||||
|
||||
self.subsidy_usd_1y_sma.height.compute_rolling_average(
|
||||
self.subsidy_usd_1y_sma.cents.height.compute_rolling_average(
|
||||
starting_indexes.height,
|
||||
&count_vecs.height_1y_ago,
|
||||
&self.subsidy.base.usd.height,
|
||||
&self.subsidy.base.cents.height,
|
||||
exit,
|
||||
)?;
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ use super::Vecs;
|
||||
use crate::{
|
||||
indexes,
|
||||
internal::{
|
||||
ComputedFromHeightLast, ValueFromHeightFull,
|
||||
ComputedFromHeightLast, FiatFromHeightLast, ValueFromHeightFull,
|
||||
ValueFromHeightSumCumulative,
|
||||
},
|
||||
};
|
||||
@@ -87,7 +87,7 @@ impl Vecs {
|
||||
version,
|
||||
indexes,
|
||||
)?,
|
||||
subsidy_usd_1y_sma: ComputedFromHeightLast::forced_import(
|
||||
subsidy_usd_1y_sma: FiatFromHeightLast::forced_import(
|
||||
db,
|
||||
"subsidy_usd_1y_sma",
|
||||
version,
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
use brk_traversable::Traversable;
|
||||
use brk_types::{Dollars, StoredF32};
|
||||
use brk_types::{Cents, StoredF32};
|
||||
use vecdb::{Rw, StorageMode};
|
||||
|
||||
use crate::internal::{
|
||||
ComputedFromHeightLast, ValueFromHeightFull,
|
||||
ComputedFromHeightLast, FiatFromHeightLast, ValueFromHeightFull,
|
||||
ValueFromHeightSumCumulative,
|
||||
};
|
||||
|
||||
@@ -24,5 +24,5 @@ pub struct Vecs<M: StorageMode = Rw> {
|
||||
pub subsidy_dominance_7d: ComputedFromHeightLast<StoredF32, M>,
|
||||
pub subsidy_dominance_30d: ComputedFromHeightLast<StoredF32, M>,
|
||||
pub subsidy_dominance_1y: ComputedFromHeightLast<StoredF32, M>,
|
||||
pub subsidy_usd_1y_sma: ComputedFromHeightLast<Dollars, M>,
|
||||
pub subsidy_usd_1y_sma: FiatFromHeightLast<Cents, M>,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user