computer: simplified a bunch of things

This commit is contained in:
nym21
2026-02-26 19:37:22 +01:00
parent 9e4fe62de2
commit cccaf6b206
252 changed files with 3788 additions and 7279 deletions

View File

@@ -1,6 +1,6 @@
use brk_error::Result;
use brk_types::{BlockRewardsEntry, TimePeriod};
use vecdb::{ReadableVec, VecIndex};
use vecdb::{ReadableOptionVec, VecIndex};
use super::day1_iter::Day1Iter;
use crate::Query;
@@ -20,11 +20,14 @@ impl Query {
.rewards
.coinbase
.sats
.day1
.average;
.rolling
.distribution
.average
._24h
.day1;
Ok(iter.collect(|di, ts, h| {
rewards_vec.collect_one(di).map(|reward| BlockRewardsEntry {
rewards_vec.collect_one_flat(di).map(|reward| BlockRewardsEntry {
avg_height: h.into(),
timestamp: *ts,
avg_rewards: *reward,