mirror of
https://github.com/bitcoinresearchkit/brk.git
synced 2026-07-25 01:38:12 -07:00
global: snapshot
This commit is contained in:
@@ -17,7 +17,7 @@ impl Vecs {
|
||||
let op_return_height = &scripts.value.op_return.base.sats.height;
|
||||
let unclaimed_height = &mining.rewards.unclaimed.base.sats.height;
|
||||
|
||||
self.unspendable.compute(
|
||||
self.total.compute(
|
||||
starting_indexes.height,
|
||||
prices,
|
||||
exit,
|
||||
|
||||
@@ -13,7 +13,7 @@ impl Vecs {
|
||||
cached_starts: &CachedWindowStarts,
|
||||
) -> Result<Self> {
|
||||
Ok(Self {
|
||||
unspendable: AmountPerBlockCumulativeWithSums::forced_import(
|
||||
total: AmountPerBlockCumulativeWithSums::forced_import(
|
||||
db,
|
||||
"unspendable_supply",
|
||||
version,
|
||||
|
||||
@@ -4,6 +4,7 @@ use vecdb::{Rw, StorageMode};
|
||||
use crate::internal::AmountPerBlockCumulativeWithSums;
|
||||
|
||||
#[derive(Traversable)]
|
||||
#[traversable(transparent)]
|
||||
pub struct Vecs<M: StorageMode = Rw> {
|
||||
pub unspendable: AmountPerBlockCumulativeWithSums<M>,
|
||||
pub total: AmountPerBlockCumulativeWithSums<M>,
|
||||
}
|
||||
|
||||
@@ -64,7 +64,7 @@ impl Vecs {
|
||||
)?;
|
||||
|
||||
let hodled_or_lost =
|
||||
LazyAmountPerBlock::identity("hodled_or_lost_coins", &cointime.supply.vaulted, version);
|
||||
LazyAmountPerBlock::identity("hodled_or_lost_supply", &cointime.supply.vaulted, version);
|
||||
|
||||
let this = Self {
|
||||
db,
|
||||
|
||||
@@ -21,7 +21,7 @@ impl Vecs {
|
||||
self.native.height.compute_rolling_ratio(
|
||||
starting_indexes.height,
|
||||
&blocks.lookback._1y,
|
||||
&transactions.volume.sent_sum.base.sats.height,
|
||||
&transactions.volume.transfer_volume.base.sats.height,
|
||||
&circulating_supply.sats.height,
|
||||
exit,
|
||||
)?;
|
||||
@@ -30,7 +30,7 @@ impl Vecs {
|
||||
self.fiat.height.compute_rolling_ratio(
|
||||
starting_indexes.height,
|
||||
&blocks.lookback._1y,
|
||||
&transactions.volume.sent_sum.base.usd.height,
|
||||
&transactions.volume.transfer_volume.base.usd.height,
|
||||
&circulating_supply.usd.height,
|
||||
exit,
|
||||
)?;
|
||||
|
||||
Reference in New Issue
Block a user