Index difficulty adjustments

This commit is contained in:
nymkappa committed 2022-07-05 16:52:56 +02:00
1 parent 570d8cfc74
commit acfdc8163b
14 files changed
+225 -83

No files matched your search

@@ -95,6 +95,7 @@ export class HashrateChartComponent implements OnInit {
.pipe(
tap((response) => {
const data = response.body;
// We generate duplicated data point so the tooltip works nicely
const diffFixed = [];
let diffIndex = 1;
@@ -112,7 +113,7 @@ export class HashrateChartComponent implements OnInit {
}
while (hashIndex < data.hashrates.length && diffIndex < data.difficulty.length &&
data.hashrates[hashIndex].timestamp <= data.difficulty[diffIndex].timestamp
data.hashrates[hashIndex].timestamp <= data.difficulty[diffIndex].time
) {
diffFixed.push({
timestamp: data.hashrates[hashIndex].timestamp,