Skip to content

Commit

Permalink
Check conditions and throw error
Browse files Browse the repository at this point in the history
  • Loading branch information
courtneyeh committed Nov 9, 2023
1 parent 9012e46 commit 3bac343
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -134,10 +134,10 @@ public void configure(TekuConfiguration.Builder builder) {
}

private List<String> parseValidatorExternalKeys(final boolean allowNoLoadedKeys) {
if (allowNoLoadedKeys) {
return validatorExternalSignerPublicKeys.stream().filter(StringUtils::isNotBlank).toList();
if (!allowNoLoadedKeys && validatorExternalSignerPublicKeys.isEmpty()) {
throw new InvalidConfigurationException("No validator external signer keys are loaded");
}
return validatorExternalSignerPublicKeys;
return validatorExternalSignerPublicKeys.stream().filter(StringUtils::isNotBlank).toList();
}

private URL parseValidatorExternalSignerUrl() {
Expand Down

0 comments on commit 3bac343

Please sign in to comment.