mirror of
https://github.com/bitcoinresearchkit/brk.git
synced 2026-04-24 14:49:58 -07:00
global: snapshot
This commit is contained in:
@@ -90,7 +90,7 @@ impl Vecs {
|
||||
let supply_total_sats = &all_metrics.supply.total.sats.height;
|
||||
|
||||
// Supply-Adjusted CDD = sum_24h(CDD) / circulating_supply_btc
|
||||
self.coindays_destroyed_supply_adjusted
|
||||
self.coindays_destroyed_supply_adj
|
||||
.height
|
||||
.compute_transform2(
|
||||
starting_indexes.height,
|
||||
@@ -108,7 +108,7 @@ impl Vecs {
|
||||
)?;
|
||||
|
||||
// Supply-Adjusted CYD = CYD / circulating_supply_btc
|
||||
self.coinyears_destroyed_supply_adjusted
|
||||
self.coinyears_destroyed_supply_adj
|
||||
.height
|
||||
.compute_transform2(
|
||||
starting_indexes.height,
|
||||
@@ -126,7 +126,7 @@ impl Vecs {
|
||||
)?;
|
||||
|
||||
// Supply-Adjusted Dormancy = dormancy / circulating_supply_btc
|
||||
self.dormancy.supply_adjusted.height.compute_transform2(
|
||||
self.dormancy.supply_adj.height.compute_transform2(
|
||||
starting_indexes.height,
|
||||
&all_activity.dormancy._24h.height,
|
||||
supply_total_sats,
|
||||
|
||||
@@ -29,12 +29,12 @@ impl Vecs {
|
||||
let rhodl_ratio = RatioPerBlock::forced_import_raw(&db, "rhodl_ratio", v, indexes)?;
|
||||
let thermo_cap_multiple =
|
||||
RatioPerBlock::forced_import_raw(&db, "thermo_cap_multiple", v, indexes)?;
|
||||
let coindays_destroyed_supply_adjusted =
|
||||
PerBlock::forced_import(&db, "coindays_destroyed_supply_adjusted", v, indexes)?;
|
||||
let coinyears_destroyed_supply_adjusted =
|
||||
PerBlock::forced_import(&db, "coinyears_destroyed_supply_adjusted", v, indexes)?;
|
||||
let coindays_destroyed_supply_adj =
|
||||
PerBlock::forced_import(&db, "coindays_destroyed_supply_adj", v, indexes)?;
|
||||
let coinyears_destroyed_supply_adj =
|
||||
PerBlock::forced_import(&db, "coinyears_destroyed_supply_adj", v, indexes)?;
|
||||
let dormancy = super::vecs::DormancyVecs {
|
||||
supply_adjusted: PerBlock::forced_import(&db, "dormancy_supply_adjusted", v, indexes)?,
|
||||
supply_adj: PerBlock::forced_import(&db, "dormancy_supply_adj", v, indexes)?,
|
||||
flow: PerBlock::forced_import(&db, "dormancy_flow", v, indexes)?,
|
||||
};
|
||||
let stock_to_flow = PerBlock::forced_import(&db, "stock_to_flow", v, indexes)?;
|
||||
@@ -49,8 +49,8 @@ impl Vecs {
|
||||
gini,
|
||||
rhodl_ratio,
|
||||
thermo_cap_multiple,
|
||||
coindays_destroyed_supply_adjusted,
|
||||
coinyears_destroyed_supply_adjusted,
|
||||
coindays_destroyed_supply_adj,
|
||||
coinyears_destroyed_supply_adj,
|
||||
dormancy,
|
||||
stock_to_flow,
|
||||
seller_exhaustion,
|
||||
|
||||
@@ -7,7 +7,7 @@ use crate::internal::{PerBlock, PercentPerBlock, RatioPerBlock};
|
||||
|
||||
#[derive(Traversable)]
|
||||
pub struct DormancyVecs<M: StorageMode = Rw> {
|
||||
pub supply_adjusted: PerBlock<StoredF32, M>,
|
||||
pub supply_adj: PerBlock<StoredF32, M>,
|
||||
pub flow: PerBlock<StoredF32, M>,
|
||||
}
|
||||
|
||||
@@ -20,8 +20,8 @@ pub struct Vecs<M: StorageMode = Rw> {
|
||||
pub gini: PercentPerBlock<BasisPoints16, M>,
|
||||
pub rhodl_ratio: RatioPerBlock<BasisPoints32, M>,
|
||||
pub thermo_cap_multiple: RatioPerBlock<BasisPoints32, M>,
|
||||
pub coindays_destroyed_supply_adjusted: PerBlock<StoredF32, M>,
|
||||
pub coinyears_destroyed_supply_adjusted: PerBlock<StoredF32, M>,
|
||||
pub coindays_destroyed_supply_adj: PerBlock<StoredF32, M>,
|
||||
pub coinyears_destroyed_supply_adj: PerBlock<StoredF32, M>,
|
||||
pub dormancy: DormancyVecs<M>,
|
||||
pub stock_to_flow: PerBlock<StoredF32, M>,
|
||||
pub seller_exhaustion: PerBlock<StoredF32, M>,
|
||||
|
||||
Reference in New Issue
Block a user