server: openapi fixes

This commit is contained in:
nym21
2025-12-16 20:23:01 +01:00
parent f7f065c6e0
commit 2ccf0ef856
23 changed files with 350 additions and 188 deletions

View File

@@ -23,6 +23,7 @@ impl Query {
.indexes
.height_to_dateindex
.read_once(current_height)?;
let current_hashrate = *computer
.chain
.indexes_to_hash_rate
@@ -58,11 +59,13 @@ impl Query {
.dateindex
.unwrap_last()
.iter();
let mut timestamp_iter = computer
.chain
.timeindexes_to_timestamp
.dateindex_extra
.unwrap_first()
.dateindex
.as_ref()
.expect("timeindexes_to_timestamp.dateindex should exist")
.iter();
let mut hashrates = Vec::with_capacity(total_days / step + 1);