Skip to content

Commit

Permalink
Fix added updated catch for unknown fee recipient in tests (ChainSafe…
Browse files Browse the repository at this point in the history
  • Loading branch information
maschad committed Mar 21, 2023
1 parent 80e45da commit a0d27b4
Showing 1 changed file with 15 additions and 9 deletions.
24 changes: 15 additions & 9 deletions packages/validator/src/validator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -164,15 +164,21 @@ export class Validator {

const validatorKeys = this.validatorStore.getValidatorKeys();

if (validatorKeys.length > 0) {
for (const pubkeyHex in validatorKeys) {
if (!indicesService.validatorPubKeyExists(pubkeyHex)) {
this.logger.info("Validator exists in beacon chain", {
index: validatorStore.getIndexOfPubkey(pubkeyHex),
pubKey: prettyBytes(pubkeyHex),
feeRecipient: validatorStore.getFeeRecipient(pubkeyHex),
});
}
for (const pubkeyHex in validatorKeys) {
let feeRecipient = "";

try {
feeRecipient = validatorStore.getFeeRecipient(pubkeyHex);
} catch (e) {
this.logger.warn("Cannot retrieve Fee Recipient", {}, e as Error);
}

if (!indicesService.validatorPubKeyExists(pubkeyHex)) {
this.logger.info("Validator exists in beacon chain", {
index: validatorStore.getIndexOfPubkey(pubkeyHex),
pubKey: prettyBytes(pubkeyHex),
feeRecipient,
});
}
}

Expand Down

0 comments on commit a0d27b4

Please sign in to comment.