global: veccached change

This commit is contained in:
nym21
2026-04-10 11:30:29 +02:00
parent 12aae503c9
commit 286256ebf0
118 changed files with 579 additions and 900 deletions
@@ -24,7 +24,7 @@ impl Vecs {
.compute(starting_indexes.height, exit, |vec| {
vec.compute_multiply(
starting_indexes.height,
&prices.cached_spot_usd,
&prices.spot.usd.height,
&coinblocks_destroyed.block,
exit,
)?;
@@ -34,7 +34,7 @@ impl Vecs {
self.created.compute(starting_indexes.height, exit, |vec| {
vec.compute_multiply(
starting_indexes.height,
&prices.cached_spot_usd,
&prices.spot.usd.height,
&activity.coinblocks_created.block,
exit,
)?;
@@ -44,7 +44,7 @@ impl Vecs {
self.stored.compute(starting_indexes.height, exit, |vec| {
vec.compute_multiply(
starting_indexes.height,
&prices.cached_spot_usd,
&prices.spot.usd.height,
&activity.coinblocks_stored.block,
exit,
)?;
@@ -57,7 +57,7 @@ impl Vecs {
self.vocdd.compute(starting_indexes.height, exit, |vec| {
vec.compute_transform3(
starting_indexes.height,
&prices.cached_spot_usd,
&prices.spot.usd.height,
&coindays_destroyed.block,
circulating_supply,
|(i, price, cdd, supply, _): (_, Dollars, StoredF64, Bitcoin, _)| {
@@ -5,7 +5,7 @@ use vecdb::Database;
use super::Vecs;
use crate::{
indexes,
internal::{CachedWindowStarts, PerBlockCumulativeRolling},
internal::{PerBlockCumulativeRolling, WindowStartVec, Windows},
};
impl Vecs {
@@ -13,7 +13,7 @@ impl Vecs {
db: &Database,
version: Version,
indexes: &indexes::Vecs,
cached_starts: &CachedWindowStarts,
cached_starts: &Windows<&WindowStartVec>,
) -> Result<Self> {
Ok(Self {
destroyed: PerBlockCumulativeRolling::forced_import(