mirror of
https://github.com/bitcoinresearchkit/brk.git
synced 2026-05-22 07:44:47 -07:00
global: fixes
This commit is contained in:
@@ -16,11 +16,12 @@ use vecdb::{
|
||||
};
|
||||
|
||||
use crate::{
|
||||
ComputeIndexes, indexes,
|
||||
indexes,
|
||||
internal::{
|
||||
CumulativeVec, Full, LazyBinaryTransformFull, LazyDateDerivedFull, LazyFull,
|
||||
SatsTimesClosePrice, Stats, compute_cumulative,
|
||||
SatsTimesClosePrice, Stats,
|
||||
},
|
||||
ComputeIndexes,
|
||||
};
|
||||
|
||||
/// Lazy dollars at TxIndex: `sats * price[height]`
|
||||
@@ -136,10 +137,9 @@ impl ValueDollarsFromTxFull {
|
||||
exit: &Exit,
|
||||
) -> Result<()> {
|
||||
// Compute height cumulative by summing lazy height.sum values
|
||||
compute_cumulative(
|
||||
self.height_cumulative.0.compute_cumulative(
|
||||
starting_indexes.height,
|
||||
&self.height.sum,
|
||||
&mut self.height_cumulative.0,
|
||||
exit,
|
||||
)?;
|
||||
|
||||
|
||||
@@ -9,11 +9,11 @@ use schemars::JsonSchema;
|
||||
use vecdb::{Database, Exit, IterableBoxedVec, IterableCloneableVec, IterableVec};
|
||||
|
||||
use crate::{
|
||||
ComputeIndexes, indexes,
|
||||
indexes,
|
||||
internal::{
|
||||
ComputedVecValue, CumulativeVec, Full, LazyDateDerivedFull, LazyFull, NumericValue,
|
||||
compute_cumulative,
|
||||
},
|
||||
ComputeIndexes,
|
||||
};
|
||||
|
||||
#[derive(Clone, Deref, DerefMut, Traversable)]
|
||||
@@ -102,6 +102,9 @@ where
|
||||
height_source: &impl IterableVec<Height, T>,
|
||||
exit: &Exit,
|
||||
) -> Result<()> {
|
||||
compute_cumulative(max_from, height_source, &mut self.height_cumulative.0, exit)
|
||||
self.height_cumulative
|
||||
.0
|
||||
.compute_cumulative(max_from, height_source, exit)?;
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,11 +12,11 @@ use vecdb::{
|
||||
};
|
||||
|
||||
use crate::{
|
||||
ComputeIndexes, indexes,
|
||||
indexes,
|
||||
internal::{
|
||||
ComputedVecValue, CumulativeVec, LazyDateDerivedSumCum, LazySumCum, NumericValue, SumCum,
|
||||
compute_cumulative,
|
||||
},
|
||||
ComputeIndexes,
|
||||
};
|
||||
|
||||
#[derive(Clone, Deref, DerefMut, Traversable)]
|
||||
@@ -99,7 +99,10 @@ where
|
||||
source: &impl IterableVec<Height, T>,
|
||||
exit: &Exit,
|
||||
) -> Result<()> {
|
||||
compute_cumulative(max_from, source, &mut self.height_cumulative.0, exit)
|
||||
self.height_cumulative
|
||||
.0
|
||||
.compute_cumulative(max_from, source, exit)?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn compute_dateindex_sum_cum(
|
||||
|
||||
Reference in New Issue
Block a user