global: snapshot

This commit is contained in:
nym21
2026-03-16 18:38:16 +01:00
parent ae067739ce
commit 5848d25612
55 changed files with 1366 additions and 1384 deletions
@@ -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>,
}
+1 -1
View File
@@ -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,
)?;