Save block predictions results in db and show results in a chart

This commit is contained in:
nymkappa
2022-07-06 22:27:45 +02:00
parent 8040abaec4
commit 0887428066
21 changed files with 576 additions and 224 deletions

View File

@@ -10,11 +10,22 @@ import { escape } from 'mysql2';
import indexer from '../indexer';
import DifficultyAdjustmentsRepository from '../repositories/DifficultyAdjustmentsRepository';
import config from '../config';
import BlocksAuditsRepository from '../repositories/BlocksAuditsRepository';
class Mining {
constructor() {
}
/**
* Get historical block predictions match rate
*/
public async $getBlockPredictionsHistory(interval: string | null = null): Promise<any> {
return await BlocksAuditsRepository.$getBlockPredictionsHistory(
this.getTimeRange(interval),
Common.getSqlInterval(interval)
);
}
/**
* Get historical block total fee
*/