Skip to content

Commit

Permalink
fix: moved all checks before validator initialization (#62)
Browse files Browse the repository at this point in the history
fix: moved storage provider balance and data availability check before join pool stage
  • Loading branch information
troykessler authored Aug 10, 2023
1 parent 4683e76 commit 8822cbe
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
6 changes: 3 additions & 3 deletions common/protocol/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -313,9 +313,6 @@ export class Validator {
process.exit(1);
}

await this.setupValidator();
await this.setupCacheProvider();

if (await this.isStorageBalanceZero()) {
process.exit(1);
}
Expand All @@ -324,6 +321,9 @@ export class Validator {
process.exit(1);
}

await this.setupValidator();
await this.setupCacheProvider();

// start the node process. Validator and cache should run at the same time.
// Thats why, although they are async they are called synchronously
try {
Expand Down
4 changes: 0 additions & 4 deletions common/protocol/src/reactors/storageProviders/Kyve.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,6 @@ export class Kyve implements IStorageProvider {
throw new Error("PoolId is empty.");
}

if (!staker) {
throw new Error("Staker is empty.");
}

if (!valaccount) {
throw new Error("Valaccount mnemonic is empty.");
}
Expand Down

0 comments on commit 8822cbe

Please sign in to comment.