Skip to content

Commit

Permalink
Use prettyBytes to print out pubkeys
Browse files Browse the repository at this point in the history
  • Loading branch information
nflaig committed Oct 1, 2023
1 parent 9f0ef49 commit af91f17
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions packages/validator/src/services/doppelgangerService.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {fromHexString} from "@chainsafe/ssz";
import {Epoch, ValidatorIndex} from "@lodestar/types";
import {Api, ApiError, routes} from "@lodestar/api";
import {Logger, sleep} from "@lodestar/utils";
import {Logger, prettyBytes, sleep} from "@lodestar/utils";
import {computeStartSlotAtEpoch} from "@lodestar/state-transition";
import {ISlashingProtection} from "../slashingProtection/index.js";
import {ProcessShutdownCallback, PubkeyHex} from "../types.js";
Expand Down Expand Up @@ -77,15 +77,19 @@ export class DoppelgangerService {
remainingEpochs = REMAINING_EPOCHS_IF_SKIPPED;
this.logger.info("Doppelganger detection skipped, previous epoch attestation exists in database", {
previousEpoch,
pubkeyHex,
pubkey: prettyBytes(pubkeyHex),
});
} else {
this.logger.info("Registered validator for doppelganger", {remainingEpochs, nextEpochToCheck, pubkeyHex});
this.logger.info("Registered validator for doppelganger", {
remainingEpochs,
nextEpochToCheck,
pubkey: prettyBytes(pubkeyHex),
});
}
} else {
this.logger.info("Doppelganger detection skipped, validator initialized before genesis", {
currentEpoch,
pubkeyHex,
pubkey: prettyBytes(pubkeyHex),
});
}

Expand Down

0 comments on commit af91f17

Please sign in to comment.