global: snapshot

This commit is contained in:
nym21
2026-03-13 16:27:10 +01:00
parent b2a1251774
commit 3709ceff8e
168 changed files with 2007 additions and 2008 deletions
+2 -2
View File
@@ -3,7 +3,7 @@ use brk_types::{Cents, Dollars, OHLCCents, OHLCDollars, OHLCSats, Sats};
use vecdb::{Rw, StorageMode};
use crate::internal::{
ComputedPerBlock, Resolutions, EagerIndexes, LazyEagerIndexes, LazyPerBlock,
PerBlock, Resolutions, EagerIndexes, LazyEagerIndexes, LazyPerBlock,
};
use super::ohlcs::{LazyOhlcVecs, OhlcVecs};
@@ -39,7 +39,7 @@ pub struct OhlcByUnit<M: StorageMode = Rw> {
#[derive(Traversable)]
pub struct PriceByUnit<M: StorageMode = Rw> {
pub cents: ComputedPerBlock<Cents, M>,
pub cents: PerBlock<Cents, M>,
pub usd: LazyPerBlock<Dollars, Cents>,
pub sats: LazyPerBlock<Sats, Cents>,
}
+3 -3
View File
@@ -11,9 +11,9 @@ use vecdb::{Database, ReadableCloneableVec, Rw, StorageMode};
use crate::{
indexes,
internal::{
CentsUnsignedToDollars, CentsUnsignedToSats, ComputedPerBlock, Resolutions,
CentsUnsignedToDollars, CentsUnsignedToSats, PerBlock, Resolutions,
EagerIndexes, LazyEagerIndexes, LazyPerBlock, OhlcCentsToDollars, OhlcCentsToSats,
finalize_db, open_db,
db_utils::{finalize_db, open_db},
},
};
@@ -51,7 +51,7 @@ impl Vecs {
) -> brk_error::Result<Self> {
let version = version + Version::new(11);
let price_cents = ComputedPerBlock::forced_import(db, "price_cents", version, indexes)?;
let price_cents = PerBlock::forced_import(db, "price_cents", version, indexes)?;
let open_cents = EagerIndexes::forced_import(db, "price_open_cents", version)?;
let high_cents = EagerIndexes::forced_import(db, "price_high_cents", version)?;