This commit is contained in:
nym21
2025-11-18 21:00:59 +01:00
parent e8f77ab2e5
commit 8467e218ae
28 changed files with 283 additions and 295 deletions

View File

@@ -85,12 +85,11 @@ impl Vecs {
.enumerate()
.skip(index.to_usize())
.try_for_each(|(i, v)| -> Result<()> {
self.height_to_price_ohlc_in_cents.forced_push_at(
self.height_to_price_ohlc_in_cents.truncate_push_at(
i,
self.fetcher
.get_height(i.into(), v, prev_timestamp)
.unwrap(),
exit,
)?;
prev_timestamp = Some(v);
Ok(())
@@ -127,7 +126,7 @@ impl Vecs {
prev.replace(ohlc.clone());
self.dateindex_to_price_ohlc_in_cents
.forced_push_at(i, ohlc, exit)?;
.truncate_push_at(i, ohlc)?;
Ok(())
})?;