mirror of
https://github.com/bitcoinresearchkit/brk.git
synced 2026-07-11 02:58:14 -07:00
global: snapshot
This commit is contained in:
@@ -23,7 +23,7 @@ impl Vecs {
|
||||
self.rate.base.height.compute_transform2(
|
||||
starting_indexes.height,
|
||||
&count_vecs.total.sum._24h.height,
|
||||
&difficulty_vecs.as_hash.height,
|
||||
&difficulty_vecs.hashrate.height,
|
||||
|(i, block_count_sum, difficulty_as_hash, ..)| {
|
||||
(
|
||||
i,
|
||||
|
||||
@@ -147,7 +147,7 @@ impl Vecs {
|
||||
exit,
|
||||
)?;
|
||||
|
||||
self.fee_ratio_multiple
|
||||
self.fee_to_subsidy_ratio
|
||||
.compute_binary::<Dollars, Dollars, RatioDollarsBp32, _, _>(
|
||||
starting_indexes.height,
|
||||
self.coinbase.sum.as_array().map(|w| &w.usd.height),
|
||||
|
||||
@@ -55,9 +55,9 @@ impl Vecs {
|
||||
)?,
|
||||
subsidy_dominance_rolling,
|
||||
subsidy_sma_1y: FiatPerBlock::forced_import(db, "subsidy_sma_1y", version, indexes)?,
|
||||
fee_ratio_multiple: RatioRollingWindows::forced_import(
|
||||
fee_to_subsidy_ratio: RatioRollingWindows::forced_import(
|
||||
db,
|
||||
"fee_ratio_multiple",
|
||||
"fee_to_subsidy_ratio",
|
||||
version,
|
||||
indexes,
|
||||
)?,
|
||||
|
||||
@@ -24,6 +24,6 @@ pub struct Vecs<M: StorageMode = Rw> {
|
||||
pub subsidy_dominance_rolling: LazyPercentRollingWindows<BasisPoints16>,
|
||||
#[traversable(wrap = "subsidy", rename = "sma_1y")]
|
||||
pub subsidy_sma_1y: FiatPerBlock<Cents, M>,
|
||||
#[traversable(wrap = "fees", rename = "ratio_multiple")]
|
||||
pub fee_ratio_multiple: RatioRollingWindows<BasisPoints32, M>,
|
||||
#[traversable(wrap = "fees", rename = "to_subsidy_ratio")]
|
||||
pub fee_to_subsidy_ratio: RatioRollingWindows<BasisPoints32, M>,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user