global: big snapshot

This commit is contained in:
nym21
2026-03-13 12:47:01 +01:00
parent c83955eea7
commit 2b31c7f6b7
158 changed files with 4961 additions and 6939 deletions
@@ -3,23 +3,20 @@ use brk_types::{Bitcoin, CheckedSub, Indexes, StoredF64};
use vecdb::Exit;
use super::Vecs;
use crate::{blocks, distribution};
use crate::distribution;
impl Vecs {
pub(crate) fn compute(
&mut self,
starting_indexes: &Indexes,
blocks: &blocks::Vecs,
distribution: &distribution::Vecs,
exit: &Exit,
) -> Result<()> {
let window_starts = blocks.lookback.window_starts();
let all_metrics = &distribution.utxo_cohorts.all.metrics;
let circulating_supply = &all_metrics.supply.total.sats.height;
self.coinblocks_created
.compute(starting_indexes.height, &window_starts, exit, |vec| {
.compute(starting_indexes.height, exit, |vec| {
vec.compute_transform(
starting_indexes.height,
circulating_supply,
@@ -30,7 +27,7 @@ impl Vecs {
})?;
self.coinblocks_stored
.compute(starting_indexes.height, &window_starts, exit, |vec| {
.compute(starting_indexes.height, exit, |vec| {
vec.compute_subtract(
starting_indexes.height,
&self.coinblocks_created.raw.height,