mirror of
https://github.com/bitcoinresearchkit/brk.git
synced 2026-04-25 07:09:59 -07:00
global: snapshot
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user