global: MASSIVE snapshot

This commit is contained in:
nym21
2026-01-07 01:16:37 +01:00
parent e832ffbe23
commit cb0abc324e
487 changed files with 21155 additions and 13627 deletions

View File

@@ -3,7 +3,7 @@ use brk_types::{Bitcoin, CheckedSub, StoredF64};
use vecdb::{Exit, TypedVecIterator};
use super::Vecs;
use crate::{distribution, indexes, utils::OptionExt, ComputeIndexes};
use crate::{distribution, indexes, ComputeIndexes};
impl Vecs {
pub fn compute(
@@ -37,12 +37,10 @@ impl Vecs {
.compute_all(indexes, starting_indexes, exit, |vec| {
let mut coinblocks_destroyed_iter = indexes_to_coinblocks_destroyed
.height
.as_ref()
.unwrap()
.into_iter();
vec.compute_transform(
starting_indexes.height,
self.indexes_to_coinblocks_created.height.u(),
&self.indexes_to_coinblocks_created.height,
|(i, created, ..)| {
let destroyed = coinblocks_destroyed_iter.get_unwrap(i);
(i, created.checked_sub(destroyed).unwrap())
@@ -56,12 +54,8 @@ impl Vecs {
.compute_all(indexes, starting_indexes, exit, |vec| {
vec.compute_divide(
starting_indexes.height,
indexes_to_coinblocks_destroyed
.height_extra
.unwrap_cumulative(),
self.indexes_to_coinblocks_created
.height_extra
.unwrap_cumulative(),
indexes_to_coinblocks_destroyed.height_cumulative.inner(),
self.indexes_to_coinblocks_created.height_cumulative.inner(),
exit,
)?;
Ok(())
@@ -71,7 +65,7 @@ impl Vecs {
.compute_all(indexes, starting_indexes, exit, |vec| {
vec.compute_transform(
starting_indexes.height,
self.indexes_to_liveliness.height.u(),
&self.indexes_to_liveliness.height,
|(i, v, ..)| (i, StoredF64::from(1.0).checked_sub(v).unwrap()),
exit,
)?;
@@ -85,8 +79,8 @@ impl Vecs {
|vec| {
vec.compute_divide(
starting_indexes.height,
self.indexes_to_liveliness.height.u(),
self.indexes_to_vaultedness.height.u(),
&self.indexes_to_liveliness.height,
&self.indexes_to_vaultedness.height,
exit,
)?;
Ok(())