mirror of
https://github.com/bitcoinresearchkit/brk.git
synced 2026-04-27 16:19:59 -07:00
global: versions
This commit is contained in:
@@ -68,15 +68,13 @@ where
|
||||
}
|
||||
};
|
||||
|
||||
let version = VERSION + version;
|
||||
|
||||
let s = Self {
|
||||
first: options.first.then(|| {
|
||||
Box::new(
|
||||
EagerVec::forced_import(
|
||||
path,
|
||||
&maybe_prefix("first"),
|
||||
version + Version::ZERO,
|
||||
version + VERSION + Version::ZERO,
|
||||
compressed,
|
||||
)
|
||||
.unwrap(),
|
||||
@@ -93,7 +91,7 @@ where
|
||||
EagerVec::forced_import(
|
||||
path,
|
||||
&maybe_suffix("min"),
|
||||
version + Version::ZERO,
|
||||
version + VERSION + Version::ZERO,
|
||||
compressed,
|
||||
)
|
||||
.unwrap(),
|
||||
@@ -104,7 +102,7 @@ where
|
||||
EagerVec::forced_import(
|
||||
path,
|
||||
&maybe_suffix("max"),
|
||||
version + Version::ZERO,
|
||||
version + VERSION + Version::ZERO,
|
||||
compressed,
|
||||
)
|
||||
.unwrap(),
|
||||
@@ -115,7 +113,7 @@ where
|
||||
EagerVec::forced_import(
|
||||
path,
|
||||
&maybe_suffix("median"),
|
||||
version + Version::ZERO,
|
||||
version + VERSION + Version::ZERO,
|
||||
compressed,
|
||||
)
|
||||
.unwrap(),
|
||||
@@ -126,7 +124,7 @@ where
|
||||
EagerVec::forced_import(
|
||||
path,
|
||||
&maybe_suffix("average"),
|
||||
version + Version::ZERO,
|
||||
version + VERSION + Version::ZERO,
|
||||
compressed,
|
||||
)
|
||||
.unwrap(),
|
||||
@@ -137,7 +135,7 @@ where
|
||||
EagerVec::forced_import(
|
||||
path,
|
||||
&maybe_suffix("sum"),
|
||||
version + Version::ZERO,
|
||||
version + VERSION + Version::ZERO,
|
||||
compressed,
|
||||
)
|
||||
.unwrap(),
|
||||
@@ -148,7 +146,7 @@ where
|
||||
EagerVec::forced_import(
|
||||
path,
|
||||
&prefix("total"),
|
||||
version + Version::ZERO,
|
||||
version + VERSION + Version::ZERO,
|
||||
compressed,
|
||||
)
|
||||
.unwrap(),
|
||||
@@ -159,7 +157,7 @@ where
|
||||
EagerVec::forced_import(
|
||||
path,
|
||||
&maybe_suffix("90p"),
|
||||
version + Version::ZERO,
|
||||
version + VERSION + Version::ZERO,
|
||||
compressed,
|
||||
)
|
||||
.unwrap(),
|
||||
@@ -170,7 +168,7 @@ where
|
||||
EagerVec::forced_import(
|
||||
path,
|
||||
&maybe_suffix("75p"),
|
||||
version + Version::ZERO,
|
||||
version + VERSION + Version::ZERO,
|
||||
compressed,
|
||||
)
|
||||
.unwrap(),
|
||||
@@ -181,7 +179,7 @@ where
|
||||
EagerVec::forced_import(
|
||||
path,
|
||||
&maybe_suffix("25p"),
|
||||
version + Version::ZERO,
|
||||
version + VERSION + Version::ZERO,
|
||||
compressed,
|
||||
)
|
||||
.unwrap(),
|
||||
@@ -192,7 +190,7 @@ where
|
||||
EagerVec::forced_import(
|
||||
path,
|
||||
&maybe_suffix("10p"),
|
||||
version + Version::ZERO,
|
||||
version + VERSION + Version::ZERO,
|
||||
compressed,
|
||||
)
|
||||
.unwrap(),
|
||||
|
||||
@@ -36,12 +36,10 @@ where
|
||||
compressed: Compressed,
|
||||
options: StorableVecGeneatorOptions,
|
||||
) -> color_eyre::Result<Self> {
|
||||
let version = VERSION + version;
|
||||
|
||||
let dateindex_extra = ComputedVecBuilder::forced_import(
|
||||
path,
|
||||
name,
|
||||
version,
|
||||
version + VERSION + Version::ZERO,
|
||||
compressed,
|
||||
options.copy_self_extra(),
|
||||
)?;
|
||||
@@ -49,18 +47,47 @@ where
|
||||
let options = options.remove_percentiles();
|
||||
|
||||
Ok(Self {
|
||||
dateindex: EagerVec::forced_import(path, name, version, compressed)?,
|
||||
dateindex: EagerVec::forced_import(
|
||||
path,
|
||||
name,
|
||||
version + VERSION + Version::ZERO,
|
||||
compressed,
|
||||
)?,
|
||||
dateindex_extra,
|
||||
weekindex: ComputedVecBuilder::forced_import(path, name, version, compressed, options)?,
|
||||
weekindex: ComputedVecBuilder::forced_import(
|
||||
path,
|
||||
name,
|
||||
version + VERSION + Version::ZERO,
|
||||
compressed,
|
||||
options,
|
||||
)?,
|
||||
monthindex: ComputedVecBuilder::forced_import(
|
||||
path, name, version, compressed, options,
|
||||
path,
|
||||
name,
|
||||
version + VERSION + Version::ZERO,
|
||||
compressed,
|
||||
options,
|
||||
)?,
|
||||
quarterindex: ComputedVecBuilder::forced_import(
|
||||
path, name, version, compressed, options,
|
||||
path,
|
||||
name,
|
||||
version + VERSION + Version::ZERO,
|
||||
compressed,
|
||||
options,
|
||||
)?,
|
||||
yearindex: ComputedVecBuilder::forced_import(
|
||||
path,
|
||||
name,
|
||||
version + VERSION + Version::ZERO,
|
||||
compressed,
|
||||
options,
|
||||
)?,
|
||||
yearindex: ComputedVecBuilder::forced_import(path, name, version, compressed, options)?,
|
||||
decadeindex: ComputedVecBuilder::forced_import(
|
||||
path, name, version, compressed, options,
|
||||
path,
|
||||
name,
|
||||
version + VERSION + Version::ZERO,
|
||||
compressed,
|
||||
options,
|
||||
)?,
|
||||
})
|
||||
}
|
||||
|
||||
@@ -43,21 +43,28 @@ where
|
||||
compressed: Compressed,
|
||||
options: StorableVecGeneatorOptions,
|
||||
) -> color_eyre::Result<Self> {
|
||||
let version = VERSION + version;
|
||||
|
||||
let height = compute_source
|
||||
.then(|| Box::new(EagerVec::forced_import(path, name, version, compressed).unwrap()));
|
||||
let height = compute_source.then(|| {
|
||||
Box::new(
|
||||
EagerVec::forced_import(path, name, version + VERSION + Version::ZERO, compressed)
|
||||
.unwrap(),
|
||||
)
|
||||
});
|
||||
|
||||
let height_extra = ComputedVecBuilder::forced_import(
|
||||
path,
|
||||
name,
|
||||
version,
|
||||
version + VERSION + Version::ZERO,
|
||||
compressed,
|
||||
options.copy_self_extra(),
|
||||
)?;
|
||||
|
||||
let dateindex =
|
||||
ComputedVecBuilder::forced_import(path, name, version, compressed, options)?;
|
||||
let dateindex = ComputedVecBuilder::forced_import(
|
||||
path,
|
||||
name,
|
||||
version + VERSION + Version::ZERO,
|
||||
compressed,
|
||||
options,
|
||||
)?;
|
||||
|
||||
let options = options.remove_percentiles();
|
||||
|
||||
@@ -65,20 +72,48 @@ where
|
||||
height,
|
||||
height_extra,
|
||||
dateindex,
|
||||
weekindex: ComputedVecBuilder::forced_import(path, name, version, compressed, options)?,
|
||||
weekindex: ComputedVecBuilder::forced_import(
|
||||
path,
|
||||
name,
|
||||
version + VERSION + Version::ZERO,
|
||||
compressed,
|
||||
options,
|
||||
)?,
|
||||
difficultyepoch: ComputedVecBuilder::forced_import(
|
||||
path, name, version, compressed, options,
|
||||
path,
|
||||
name,
|
||||
version + VERSION + Version::ZERO,
|
||||
compressed,
|
||||
options,
|
||||
)?,
|
||||
monthindex: ComputedVecBuilder::forced_import(
|
||||
path, name, version, compressed, options,
|
||||
path,
|
||||
name,
|
||||
version + VERSION + Version::ZERO,
|
||||
compressed,
|
||||
options,
|
||||
)?,
|
||||
quarterindex: ComputedVecBuilder::forced_import(
|
||||
path, name, version, compressed, options,
|
||||
path,
|
||||
name,
|
||||
version + VERSION + Version::ZERO,
|
||||
compressed,
|
||||
options,
|
||||
)?,
|
||||
yearindex: ComputedVecBuilder::forced_import(path, name, version, compressed, options)?,
|
||||
// halvingepoch: StorableVecGeneator::forced_import(path, name, version, compressed, options)?,
|
||||
yearindex: ComputedVecBuilder::forced_import(
|
||||
path,
|
||||
name,
|
||||
version + VERSION + Version::ZERO,
|
||||
compressed,
|
||||
options,
|
||||
)?,
|
||||
// halvingepoch: StorableVecGeneator::forced_import(path, name, version + VERSION + Version::ZERO, compressed, options)?,
|
||||
decadeindex: ComputedVecBuilder::forced_import(
|
||||
path, name, version, compressed, options,
|
||||
path,
|
||||
name,
|
||||
version + VERSION + Version::ZERO,
|
||||
compressed,
|
||||
options,
|
||||
)?,
|
||||
})
|
||||
}
|
||||
|
||||
@@ -34,14 +34,13 @@ where
|
||||
compressed: Compressed,
|
||||
options: StorableVecGeneatorOptions,
|
||||
) -> color_eyre::Result<Self> {
|
||||
let version = VERSION + version;
|
||||
|
||||
let height = EagerVec::forced_import(path, name, version, compressed)?;
|
||||
let height =
|
||||
EagerVec::forced_import(path, name, version + VERSION + Version::ZERO, compressed)?;
|
||||
|
||||
let height_extra = ComputedVecBuilder::forced_import(
|
||||
path,
|
||||
name,
|
||||
version,
|
||||
version + VERSION + Version::ZERO,
|
||||
compressed,
|
||||
options.copy_self_extra(),
|
||||
)?;
|
||||
@@ -52,9 +51,13 @@ where
|
||||
height,
|
||||
height_extra,
|
||||
difficultyepoch: ComputedVecBuilder::forced_import(
|
||||
path, name, version, compressed, options,
|
||||
path,
|
||||
name,
|
||||
version + VERSION + Version::ZERO,
|
||||
compressed,
|
||||
options,
|
||||
)?,
|
||||
// halvingepoch: StorableVecGeneator::forced_import(path, name, version, compressed, options)?,
|
||||
// halvingepoch: StorableVecGeneator::forced_import(path, name, version + VERSION + Version::ZERO, compressed, options)?,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -47,33 +47,75 @@ where
|
||||
compressed: Compressed,
|
||||
options: StorableVecGeneatorOptions,
|
||||
) -> color_eyre::Result<Self> {
|
||||
let version = VERSION + version;
|
||||
let txindex = compute_source.then(|| {
|
||||
Box::new(
|
||||
EagerVec::forced_import(path, name, version + VERSION + Version::ZERO, compressed)
|
||||
.unwrap(),
|
||||
)
|
||||
});
|
||||
|
||||
let txindex = compute_source
|
||||
.then(|| Box::new(EagerVec::forced_import(path, name, version, compressed).unwrap()));
|
||||
|
||||
let height = ComputedVecBuilder::forced_import(path, name, version, compressed, options)?;
|
||||
let height = ComputedVecBuilder::forced_import(
|
||||
path,
|
||||
name,
|
||||
version + VERSION + Version::ZERO,
|
||||
compressed,
|
||||
options,
|
||||
)?;
|
||||
|
||||
let options = options.remove_percentiles();
|
||||
|
||||
Ok(Self {
|
||||
txindex,
|
||||
height,
|
||||
dateindex: ComputedVecBuilder::forced_import(path, name, version, compressed, options)?,
|
||||
weekindex: ComputedVecBuilder::forced_import(path, name, version, compressed, options)?,
|
||||
dateindex: ComputedVecBuilder::forced_import(
|
||||
path,
|
||||
name,
|
||||
version + VERSION + Version::ZERO,
|
||||
compressed,
|
||||
options,
|
||||
)?,
|
||||
weekindex: ComputedVecBuilder::forced_import(
|
||||
path,
|
||||
name,
|
||||
version + VERSION + Version::ZERO,
|
||||
compressed,
|
||||
options,
|
||||
)?,
|
||||
difficultyepoch: ComputedVecBuilder::forced_import(
|
||||
path, name, version, compressed, options,
|
||||
path,
|
||||
name,
|
||||
version + VERSION + Version::ZERO,
|
||||
compressed,
|
||||
options,
|
||||
)?,
|
||||
monthindex: ComputedVecBuilder::forced_import(
|
||||
path, name, version, compressed, options,
|
||||
path,
|
||||
name,
|
||||
version + VERSION + Version::ZERO,
|
||||
compressed,
|
||||
options,
|
||||
)?,
|
||||
quarterindex: ComputedVecBuilder::forced_import(
|
||||
path, name, version, compressed, options,
|
||||
path,
|
||||
name,
|
||||
version + VERSION + Version::ZERO,
|
||||
compressed,
|
||||
options,
|
||||
)?,
|
||||
yearindex: ComputedVecBuilder::forced_import(path, name, version, compressed, options)?,
|
||||
// halvingepoch: StorableVecGeneator::forced_import(path, name, version, compressed, options)?,
|
||||
yearindex: ComputedVecBuilder::forced_import(
|
||||
path,
|
||||
name,
|
||||
version + VERSION + Version::ZERO,
|
||||
compressed,
|
||||
options,
|
||||
)?,
|
||||
// halvingepoch: StorableVecGeneator::forced_import(path, name, version + VERSION + Version::ZERO, compressed, options)?,
|
||||
decadeindex: ComputedVecBuilder::forced_import(
|
||||
path, name, version, compressed, options,
|
||||
path,
|
||||
name,
|
||||
version + VERSION + Version::ZERO,
|
||||
compressed,
|
||||
options,
|
||||
)?,
|
||||
})
|
||||
}
|
||||
|
||||
@@ -69,7 +69,7 @@ impl ComputedRatioVecsFromDateIndex {
|
||||
ComputedVecsFromDateIndex::forced_import(
|
||||
path,
|
||||
name,
|
||||
VERSION + version,
|
||||
version + VERSION,
|
||||
compressed,
|
||||
options,
|
||||
)
|
||||
@@ -78,224 +78,224 @@ impl ComputedRatioVecsFromDateIndex {
|
||||
ratio: ComputedVecsFromDateIndex::forced_import(
|
||||
path,
|
||||
&format!("{name}_ratio"),
|
||||
VERSION + version + Version::ZERO,
|
||||
version + VERSION + Version::ZERO,
|
||||
compressed,
|
||||
options,
|
||||
)?,
|
||||
ratio_sma: ComputedVecsFromDateIndex::forced_import(
|
||||
path,
|
||||
&format!("{name}_ratio_sma"),
|
||||
VERSION + version + Version::ZERO,
|
||||
version + VERSION + Version::ZERO,
|
||||
compressed,
|
||||
options,
|
||||
)?,
|
||||
ratio_1w_sma: ComputedVecsFromDateIndex::forced_import(
|
||||
path,
|
||||
&format!("{name}_ratio_1w_sma"),
|
||||
VERSION + version + Version::ZERO,
|
||||
version + VERSION + Version::ZERO,
|
||||
compressed,
|
||||
options,
|
||||
)?,
|
||||
ratio_1m_sma: ComputedVecsFromDateIndex::forced_import(
|
||||
path,
|
||||
&format!("{name}_ratio_1m_sma"),
|
||||
VERSION + version + Version::ZERO,
|
||||
version + VERSION + Version::ZERO,
|
||||
compressed,
|
||||
options,
|
||||
)?,
|
||||
ratio_1y_sma: ComputedVecsFromDateIndex::forced_import(
|
||||
path,
|
||||
&format!("{name}_ratio_1y_sma"),
|
||||
VERSION + version + Version::ZERO,
|
||||
version + VERSION + Version::ZERO,
|
||||
compressed,
|
||||
options,
|
||||
)?,
|
||||
ratio_1y_sma_momentum_oscillator: ComputedVecsFromDateIndex::forced_import(
|
||||
path,
|
||||
&format!("{name}_ratio_1y_sma_momentum_oscillator"),
|
||||
VERSION + version + Version::ZERO,
|
||||
version + VERSION + Version::ZERO,
|
||||
compressed,
|
||||
options,
|
||||
)?,
|
||||
ratio_standard_deviation: ComputedVecsFromDateIndex::forced_import(
|
||||
path,
|
||||
&format!("{name}_ratio_standard_deviation"),
|
||||
VERSION + version + Version::ZERO,
|
||||
version + VERSION + Version::ZERO,
|
||||
compressed,
|
||||
options,
|
||||
)?,
|
||||
ratio_p99_9: ComputedVecsFromDateIndex::forced_import(
|
||||
path,
|
||||
&format!("{name}_ratio_p99_9"),
|
||||
VERSION + version + Version::ZERO,
|
||||
version + VERSION + Version::ZERO,
|
||||
compressed,
|
||||
options,
|
||||
)?,
|
||||
ratio_p99_5: ComputedVecsFromDateIndex::forced_import(
|
||||
path,
|
||||
&format!("{name}_ratio_p99_5"),
|
||||
VERSION + version + Version::ZERO,
|
||||
version + VERSION + Version::ZERO,
|
||||
compressed,
|
||||
options,
|
||||
)?,
|
||||
ratio_p99: ComputedVecsFromDateIndex::forced_import(
|
||||
path,
|
||||
&format!("{name}_ratio_p99"),
|
||||
VERSION + version + Version::ZERO,
|
||||
version + VERSION + Version::ZERO,
|
||||
compressed,
|
||||
options,
|
||||
)?,
|
||||
ratio_p1: ComputedVecsFromDateIndex::forced_import(
|
||||
path,
|
||||
&format!("{name}_ratio_p1"),
|
||||
VERSION + version + Version::ZERO,
|
||||
version + VERSION + Version::ZERO,
|
||||
compressed,
|
||||
options,
|
||||
)?,
|
||||
ratio_p0_5: ComputedVecsFromDateIndex::forced_import(
|
||||
path,
|
||||
&format!("{name}_ratio_p0_5"),
|
||||
VERSION + version + Version::ZERO,
|
||||
version + VERSION + Version::ZERO,
|
||||
compressed,
|
||||
options,
|
||||
)?,
|
||||
ratio_p0_1: ComputedVecsFromDateIndex::forced_import(
|
||||
path,
|
||||
&format!("{name}_ratio_p0_1"),
|
||||
VERSION + version + Version::ZERO,
|
||||
version + VERSION + Version::ZERO,
|
||||
compressed,
|
||||
options,
|
||||
)?,
|
||||
ratio_p1sd: ComputedVecsFromDateIndex::forced_import(
|
||||
path,
|
||||
&format!("{name}_ratio_p1sd"),
|
||||
VERSION + version + Version::ZERO,
|
||||
version + VERSION + Version::ZERO,
|
||||
compressed,
|
||||
options,
|
||||
)?,
|
||||
ratio_p2sd: ComputedVecsFromDateIndex::forced_import(
|
||||
path,
|
||||
&format!("{name}_ratio_p2sd"),
|
||||
VERSION + version + Version::ZERO,
|
||||
version + VERSION + Version::ZERO,
|
||||
compressed,
|
||||
options,
|
||||
)?,
|
||||
ratio_p3sd: ComputedVecsFromDateIndex::forced_import(
|
||||
path,
|
||||
&format!("{name}_ratio_p3sd"),
|
||||
VERSION + version + Version::ZERO,
|
||||
version + VERSION + Version::ZERO,
|
||||
compressed,
|
||||
options,
|
||||
)?,
|
||||
ratio_m1sd: ComputedVecsFromDateIndex::forced_import(
|
||||
path,
|
||||
&format!("{name}_ratio_m1sd"),
|
||||
VERSION + version + Version::ZERO,
|
||||
version + VERSION + Version::ZERO,
|
||||
compressed,
|
||||
options,
|
||||
)?,
|
||||
ratio_m2sd: ComputedVecsFromDateIndex::forced_import(
|
||||
path,
|
||||
&format!("{name}_ratio_m2sd"),
|
||||
VERSION + version + Version::ZERO,
|
||||
version + VERSION + Version::ZERO,
|
||||
compressed,
|
||||
options,
|
||||
)?,
|
||||
ratio_m3sd: ComputedVecsFromDateIndex::forced_import(
|
||||
path,
|
||||
&format!("{name}_ratio_m3sd"),
|
||||
VERSION + version + Version::ZERO,
|
||||
version + VERSION + Version::ZERO,
|
||||
compressed,
|
||||
options,
|
||||
)?,
|
||||
ratio_p99_9_as_price: ComputedVecsFromDateIndex::forced_import(
|
||||
path,
|
||||
&format!("{name}_ratio_p99_9_as_price"),
|
||||
VERSION + version + Version::ZERO,
|
||||
version + VERSION + Version::ZERO,
|
||||
compressed,
|
||||
options,
|
||||
)?,
|
||||
ratio_p99_5_as_price: ComputedVecsFromDateIndex::forced_import(
|
||||
path,
|
||||
&format!("{name}_ratio_p99_5_as_price"),
|
||||
VERSION + version + Version::ZERO,
|
||||
version + VERSION + Version::ZERO,
|
||||
compressed,
|
||||
options,
|
||||
)?,
|
||||
ratio_p99_as_price: ComputedVecsFromDateIndex::forced_import(
|
||||
path,
|
||||
&format!("{name}_ratio_p99_as_price"),
|
||||
VERSION + version + Version::ZERO,
|
||||
version + VERSION + Version::ZERO,
|
||||
compressed,
|
||||
options,
|
||||
)?,
|
||||
ratio_p1_as_price: ComputedVecsFromDateIndex::forced_import(
|
||||
path,
|
||||
&format!("{name}_ratio_p1_as_price"),
|
||||
VERSION + version + Version::ZERO,
|
||||
version + VERSION + Version::ZERO,
|
||||
compressed,
|
||||
options,
|
||||
)?,
|
||||
ratio_p0_5_as_price: ComputedVecsFromDateIndex::forced_import(
|
||||
path,
|
||||
&format!("{name}_ratio_p0_5_as_price"),
|
||||
VERSION + version + Version::ZERO,
|
||||
version + VERSION + Version::ZERO,
|
||||
compressed,
|
||||
options,
|
||||
)?,
|
||||
ratio_p0_1_as_price: ComputedVecsFromDateIndex::forced_import(
|
||||
path,
|
||||
&format!("{name}_ratio_p0_1_as_price"),
|
||||
VERSION + version + Version::ZERO,
|
||||
version + VERSION + Version::ZERO,
|
||||
compressed,
|
||||
options,
|
||||
)?,
|
||||
ratio_p1sd_as_price: ComputedVecsFromDateIndex::forced_import(
|
||||
path,
|
||||
&format!("{name}_ratio_p1sd_as_price"),
|
||||
VERSION + version + Version::ZERO,
|
||||
version + VERSION + Version::ZERO,
|
||||
compressed,
|
||||
options,
|
||||
)?,
|
||||
ratio_p2sd_as_price: ComputedVecsFromDateIndex::forced_import(
|
||||
path,
|
||||
&format!("{name}_ratio_p2sd_as_price"),
|
||||
VERSION + version + Version::ZERO,
|
||||
version + VERSION + Version::ZERO,
|
||||
compressed,
|
||||
options,
|
||||
)?,
|
||||
ratio_p3sd_as_price: ComputedVecsFromDateIndex::forced_import(
|
||||
path,
|
||||
&format!("{name}_ratio_p3sd_as_price"),
|
||||
VERSION + version + Version::ZERO,
|
||||
version + VERSION + Version::ZERO,
|
||||
compressed,
|
||||
options,
|
||||
)?,
|
||||
ratio_m1sd_as_price: ComputedVecsFromDateIndex::forced_import(
|
||||
path,
|
||||
&format!("{name}_ratio_m1sd_as_price"),
|
||||
VERSION + version + Version::ZERO,
|
||||
version + VERSION + Version::ZERO,
|
||||
compressed,
|
||||
options,
|
||||
)?,
|
||||
ratio_m2sd_as_price: ComputedVecsFromDateIndex::forced_import(
|
||||
path,
|
||||
&format!("{name}_ratio_m2sd_as_price"),
|
||||
VERSION + version + Version::ZERO,
|
||||
version + VERSION + Version::ZERO,
|
||||
compressed,
|
||||
options,
|
||||
)?,
|
||||
ratio_m3sd_as_price: ComputedVecsFromDateIndex::forced_import(
|
||||
path,
|
||||
&format!("{name}_ratio_m3sd_as_price"),
|
||||
VERSION + version + Version::ZERO,
|
||||
version + VERSION + Version::ZERO,
|
||||
compressed,
|
||||
options,
|
||||
)?,
|
||||
ratio_zscore: ComputedVecsFromDateIndex::forced_import(
|
||||
path,
|
||||
&format!("{name}_ratio_zscore"),
|
||||
VERSION + version + Version::ZERO,
|
||||
version + VERSION + Version::ZERO,
|
||||
compressed,
|
||||
options,
|
||||
)?,
|
||||
|
||||
@@ -18,7 +18,7 @@ pub struct ComputedValueVecsFromHeight {
|
||||
pub dollars: Option<ComputedVecsFromHeight<Dollars>>,
|
||||
}
|
||||
|
||||
const VERSION: Version = Version::ONE;
|
||||
const VERSION: Version = Version::ZERO;
|
||||
|
||||
impl ComputedValueVecsFromHeight {
|
||||
pub fn forced_import(
|
||||
@@ -35,7 +35,7 @@ impl ComputedValueVecsFromHeight {
|
||||
path,
|
||||
name,
|
||||
compute_source,
|
||||
VERSION + version,
|
||||
version + VERSION,
|
||||
compressed,
|
||||
options,
|
||||
)?,
|
||||
@@ -43,7 +43,7 @@ impl ComputedValueVecsFromHeight {
|
||||
path,
|
||||
&format!("{name}_in_btc"),
|
||||
true,
|
||||
VERSION + version,
|
||||
version + VERSION,
|
||||
compressed,
|
||||
options,
|
||||
)?,
|
||||
@@ -52,7 +52,7 @@ impl ComputedValueVecsFromHeight {
|
||||
path,
|
||||
&format!("{name}_in_usd"),
|
||||
true,
|
||||
VERSION + version,
|
||||
version + VERSION,
|
||||
compressed,
|
||||
options,
|
||||
)
|
||||
|
||||
@@ -33,7 +33,7 @@ pub struct ComputedValueVecsFromTxindex {
|
||||
pub dollars: Option<ComputedVecsFromTxindex<Dollars>>,
|
||||
}
|
||||
|
||||
const VERSION: Version = Version::ONE;
|
||||
const VERSION: Version = Version::ZERO;
|
||||
|
||||
impl ComputedValueVecsFromTxindex {
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
@@ -58,14 +58,14 @@ impl ComputedValueVecsFromTxindex {
|
||||
path,
|
||||
name,
|
||||
compute_source,
|
||||
VERSION + version,
|
||||
version + VERSION,
|
||||
compressed,
|
||||
options,
|
||||
)?;
|
||||
|
||||
let bitcoin_txindex = LazyVecFrom1::init(
|
||||
&name_in_btc,
|
||||
VERSION + version,
|
||||
version + VERSION,
|
||||
source.map_or_else(|| sats.txindex.as_ref().unwrap().boxed_clone(), |s| s),
|
||||
|txindex: TxIndex, iter| {
|
||||
iter.next_at(txindex.unwrap_to_usize()).map(|(_, value)| {
|
||||
@@ -79,7 +79,7 @@ impl ComputedValueVecsFromTxindex {
|
||||
path,
|
||||
&name_in_btc,
|
||||
false,
|
||||
VERSION + version,
|
||||
version + VERSION,
|
||||
compressed,
|
||||
options,
|
||||
)?;
|
||||
@@ -89,7 +89,7 @@ impl ComputedValueVecsFromTxindex {
|
||||
computation,
|
||||
path,
|
||||
&name_in_usd,
|
||||
VERSION + version,
|
||||
version + VERSION,
|
||||
compressed,
|
||||
bitcoin_txindex.boxed_clone(),
|
||||
indexes.txindex_to_height.boxed_clone(),
|
||||
@@ -125,7 +125,7 @@ impl ComputedValueVecsFromTxindex {
|
||||
path,
|
||||
&name_in_usd,
|
||||
false,
|
||||
VERSION + version,
|
||||
version + VERSION,
|
||||
compressed,
|
||||
options,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user