Skip to content

Commit

Permalink
chore: add more comments
Browse files Browse the repository at this point in the history
  • Loading branch information
twoeths committed Dec 6, 2024
1 parent c3b42a4 commit e91c9ec
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,9 @@ function isValidSwitchToCompoundRequest(
const sourceIndex = state.epochCtx.getValidatorIndex(sourcePubkey);
const targetIndex = state.epochCtx.getValidatorIndex(targetPubkey);

// since we share pubkey2index, validatorIndex maybe known by other epoch transition but we don't have that validator in this state
// Verify pubkey exists
if (sourceIndex === null || sourceIndex >= state.validators.length) {
if (sourceIndex === null) {
// this check is mainly to make the compiler happy, pubkey is checked by the consumer already
return false;
}

Expand Down

0 comments on commit e91c9ec

Please sign in to comment.