diff --git a/common/protocol/src/index.ts b/common/protocol/src/index.ts index d2fa08e8..e7f2816a 100644 --- a/common/protocol/src/index.ts +++ b/common/protocol/src/index.ts @@ -308,15 +308,6 @@ export class Validator { await this.setupSDK(); await this.syncPoolState(true); - // perform validation checks - if (!this.isValidRuntime()) { - process.exit(1); - } - - if (!this.isValidVersion()) { - process.exit(1); - } - if (await this.isStorageBalanceZero()) { process.exit(1); } @@ -326,10 +317,6 @@ export class Validator { await sleep(IDLE_TIME); } - if (!(await this.isDataAvailable())) { - process.exit(1); - } - await this.setupValidator(); await this.setupCacheProvider(); diff --git a/common/protocol/src/methods/main/runNode.ts b/common/protocol/src/methods/main/runNode.ts index 5eadb8d9..1a214007 100644 --- a/common/protocol/src/methods/main/runNode.ts +++ b/common/protocol/src/methods/main/runNode.ts @@ -29,15 +29,6 @@ export async function runNode(this: Validator): Promise { await this.syncPoolState(); await this.getBalancesForMetrics(); - // perform basic validation checks, if one fails exit - if (!this.isValidRuntime()) { - process.exit(1); - } - - if (!this.isValidVersion()) { - process.exit(1); - } - if (!this.isNodeValidator()) { process.exit(1); } diff --git a/common/protocol/src/methods/queries/syncPoolState.ts b/common/protocol/src/methods/queries/syncPoolState.ts index bc2d4511..1fa0239f 100644 --- a/common/protocol/src/methods/queries/syncPoolState.ts +++ b/common/protocol/src/methods/queries/syncPoolState.ts @@ -32,9 +32,17 @@ export async function syncPoolState( id: this.poolId.toString(), }); this.pool = pool!; - this.m.query_pool_successful.inc(); + // perform validation checks + if (!this.isValidRuntime()) { + process.exit(1); + } + + if (!this.isValidVersion()) { + process.exit(1); + } + // if config link has changed sync the config if (prevConfig !== this.pool.data!.config) { try {