computer: snapshot

This commit is contained in:
nym21
2026-03-09 11:16:50 +01:00
parent 0bff57fb43
commit 3e8cf4a975
92 changed files with 853 additions and 825 deletions

View File

@@ -18,7 +18,7 @@ impl Vecs {
exit: &Exit,
) -> Result<()> {
self.count
.compute(indexer, &blocks.count, starting_indexes, exit)?;
.compute(indexer, &blocks.lookback, starting_indexes, exit)?;
self.value
.compute(indexer, prices, starting_indexes, exit)?;

View File

@@ -10,11 +10,11 @@ impl Vecs {
pub(crate) fn compute(
&mut self,
indexer: &Indexer,
count_vecs: &blocks::CountVecs,
lookback: &blocks::LookbackVecs,
starting_indexes: &Indexes,
exit: &Exit,
) -> Result<()> {
let window_starts = count_vecs.window_starts();
let window_starts = lookback.window_starts();
self.p2a
.compute(starting_indexes.height, &window_starts, exit, |v| {

View File

@@ -3,7 +3,7 @@ use brk_types::Version;
use vecdb::Database;
use super::Vecs;
use crate::{indexes, internal::ValueFromHeightCumulative};
use crate::{indexes, internal::AmountFromHeightCumulative};
impl Vecs {
pub(crate) fn forced_import(
@@ -12,7 +12,7 @@ impl Vecs {
indexes: &indexes::Vecs,
) -> Result<Self> {
Ok(Self {
opreturn: ValueFromHeightCumulative::forced_import(
opreturn: AmountFromHeightCumulative::forced_import(
db,
"opreturn_value",
version,

View File

@@ -1,9 +1,9 @@
use brk_traversable::Traversable;
use vecdb::{Rw, StorageMode};
use crate::internal::ValueFromHeightCumulative;
use crate::internal::AmountFromHeightCumulative;
#[derive(Traversable)]
pub struct Vecs<M: StorageMode = Rw> {
pub opreturn: ValueFromHeightCumulative<M>,
pub opreturn: AmountFromHeightCumulative<M>,
}