global: snapshot

This commit is contained in:
nym21
2026-03-26 15:57:22 +01:00
parent 6d3307c0df
commit 18bb4186a8
72 changed files with 2013 additions and 1150 deletions

View File

@@ -46,7 +46,7 @@ impl<'a> Day1Iter<'a> {
.to_usize()
.saturating_sub(self.start_di.to_usize())
+ 1;
let timestamps = &self.computer.blocks.time.timestamp.day1;
let timestamps = &self.computer.indexes.timestamp.day1;
let heights = &self.computer.indexes.day1.first_height;
let mut entries = Vec::with_capacity(total / self.step + 1);

View File

@@ -45,8 +45,7 @@ impl Query {
// Get timestamps using difficulty_to_timestamp for epoch start
let epoch_start_timestamp = computer
.blocks
.time
.indexes
.timestamp
.epoch
.collect_one(current_epoch)

View File

@@ -22,7 +22,7 @@ pub fn iter_difficulty_epochs(
.unwrap_or_default();
let epoch_to_height = &computer.indexes.epoch.first_height;
let epoch_to_timestamp = &computer.blocks.time.timestamp.epoch;
let epoch_to_timestamp = &computer.indexes.timestamp.epoch;
let epoch_to_difficulty = &computer.blocks.difficulty.value.epoch;
let mut results = Vec::with_capacity(end_epoch.to_usize() - start_epoch.to_usize() + 1);

View File

@@ -56,7 +56,7 @@ impl Query {
let step = (total_days / 200).max(1); // Max ~200 data points
let hashrate_vec = &computer.mining.hashrate.rate.base.day1;
let timestamp_vec = &computer.blocks.time.timestamp.day1;
let timestamp_vec = &computer.indexes.timestamp.day1;
let mut hashrates = Vec::with_capacity(total_days / step + 1);
let mut di = start_day1.to_usize();