Skip to content

Commit

Permalink
lol
Browse files Browse the repository at this point in the history
  • Loading branch information
onmax committed Aug 19, 2024
1 parent dba02a5 commit 9a59e33
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions server/api/vts/health.get.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { max, count, } from 'drizzle-orm';
import { NimiqRPCClient } from 'nimiq-rpc-client-ts';
import { Range, getRange } from 'nimiq-vts';
// import { Range, getRange } from 'nimiq-vts';
import { getMissingEpochs } from '~~/server/database/utils';

export enum HealthFlag {
Expand All @@ -18,7 +18,8 @@ export interface HealthStatus {
currentEpoch: number
missingEpochs: number[]
fetchedEpochs: number[]
range: Range
// range: Range
range: any

isSynced: boolean
flags: HealthFlag[]
Expand Down Expand Up @@ -74,9 +75,10 @@ export default defineEventHandler(async (event) => {
throw errorCurrentEpoch;
console.log('Current Epoch:', currentEpoch)

const range = await getRange(rpcClient);
console.log('Range:', range)
const missingEpochs = await getMissingEpochs(range);
// const range = await getRange(rpcClient);
// console.log('Range:', range)
// const missingEpochs = await getMissingEpochs(range);
const missingEpochs = [] as number[]
console.log('Missing Epochs:', missingEpochs)

const isSynced = missingEpochs.length === 0;
Expand All @@ -90,7 +92,7 @@ export default defineEventHandler(async (event) => {
totalValidators,
headBlockNumber,
currentEpoch,
range,
range: {},
missingEpochs,
isSynced,
flags,
Expand Down

0 comments on commit 9a59e33

Please sign in to comment.