crates: snapshot

This commit is contained in:
nym21
2025-12-31 00:02:50 +01:00
parent a6f8108165
commit ac6175688d
5 changed files with 140 additions and 149 deletions
@@ -155,13 +155,6 @@ impl Vecs {
exit,
)?;
self.halvingepoch_to_timestamp.compute_transform(
starting_indexes.halvingepoch,
&indexes.block.halvingepoch_to_first_height,
|(i, h, ..)| (i, height_to_timestamp_iter.get_unwrap(h)),
exit,
)?;
Ok(())
}
}
@@ -167,7 +167,6 @@ impl Vecs {
)?,
// Timestamp metrics (moved from epoch)
difficultyepoch_to_timestamp: EagerVec::forced_import(db, "timestamp", version + v0)?,
halvingepoch_to_timestamp: EagerVec::forced_import(db, "timestamp", version + v0)?,
timeindexes_to_timestamp: ComputedVecsFromDateIndex::forced_import(
db,
"timestamp",
+2 -3
View File
@@ -1,7 +1,7 @@
use brk_traversable::Traversable;
use brk_types::{
DateIndex, DecadeIndex, DifficultyEpoch, HalvingEpoch, Height, MonthIndex, QuarterIndex,
SemesterIndex, StoredU32, StoredU64, Timestamp, WeekIndex, Weight, YearIndex,
DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, SemesterIndex,
StoredU32, StoredU64, Timestamp, WeekIndex, Weight, YearIndex,
};
use vecdb::{EagerVec, LazyVecFrom1, PcoVec};
@@ -33,6 +33,5 @@ pub struct Vecs {
pub indexes_to_block_vbytes: ComputedVecsFromHeight<StoredU64>,
pub indexes_to_block_weight: ComputedVecsFromHeight<Weight>,
pub difficultyepoch_to_timestamp: EagerVec<PcoVec<DifficultyEpoch, Timestamp>>,
pub halvingepoch_to_timestamp: EagerVec<PcoVec<HalvingEpoch, Timestamp>>,
pub timeindexes_to_timestamp: ComputedVecsFromDateIndex<Timestamp>,
}