Skip to content

Commit

Permalink
Fix compiling bug
Browse files Browse the repository at this point in the history
  • Loading branch information
courtneyeh committed Nov 23, 2023
1 parent 1095cd8 commit 93a67c9
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 39 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,7 @@ public static ValidatorClientService create(
new GenesisDataProvider(asyncRunner, validatorApiChannel);
final ForkProvider forkProvider = new ForkProvider(config.getSpec(), genesisDataProvider);

final ValidatorLoader validatorLoader =
createValidatorLoader(
services, config, asyncRunner, validatorConfig.isExitWhenNoValidatorKeysEnabled());
final ValidatorLoader validatorLoader = createValidatorLoader(services, config, asyncRunner);
final ValidatorRestApiConfig validatorApiConfig = config.getValidatorRestApiConfig();
final ValidatorStatusProvider validatorStatusProvider =
new OwnedValidatorStatusProvider(
Expand Down Expand Up @@ -364,8 +362,7 @@ private static BeaconNodeApi createBeaconNodeApi(
private static ValidatorLoader createValidatorLoader(
final ServiceConfig services,
final ValidatorClientConfiguration config,
final AsyncRunner asyncRunner,
final boolean exitWhenNoValidatorKeysEnabled) {
final AsyncRunner asyncRunner) {
final Path slashingProtectionPath = getSlashingProtectionPath(services.getDataDirLayout());
final SlashingProtector slashingProtector =
new LocalSlashingProtector(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,7 @@ void shouldLoadPublicKeysFromUrls() {
publicKeyLoader,
asyncRunner,
metricsSystem,
Optional.empty(),
false);
Optional.empty());

validatorLoader.loadValidators();
final OwnedValidators validators = validatorLoader.getOwnedValidators();
Expand Down Expand Up @@ -176,8 +175,7 @@ void initializeValidatorsWithExternalSignerAndSlashingProtection() {
publicKeyLoader,
asyncRunner,
metricsSystem,
Optional.empty(),
false);
Optional.empty());

validatorLoader.loadValidators();
final OwnedValidators validators = validatorLoader.getOwnedValidators();
Expand Down Expand Up @@ -221,8 +219,7 @@ void initializeValidatorsWithExternalSignerAndNoSlashingProtection() {
publicKeyLoader,
asyncRunner,
metricsSystem,
Optional.empty(),
false);
Optional.empty());

validatorLoader.loadValidators();
final OwnedValidators validators = validatorLoader.getOwnedValidators();
Expand Down Expand Up @@ -268,8 +265,7 @@ void initializeValidatorsWithBothLocalAndExternalSigners(@TempDir Path tempDir)
publicKeyLoader,
asyncRunner,
metricsSystem,
Optional.empty(),
false);
Optional.empty());

validatorLoader.loadValidators();
final OwnedValidators validators = validatorLoader.getOwnedValidators();
Expand Down Expand Up @@ -314,8 +310,7 @@ void shouldInitializeLocalAndMutableValidators(
publicKeyLoader,
asyncRunner,
metricsSystem,
Optional.of(dataDirLayout),
false);
Optional.of(dataDirLayout));

validatorLoader.loadValidators();
final OwnedValidators validators = validatorLoader.getOwnedValidators();
Expand Down Expand Up @@ -353,8 +348,7 @@ void shouldReturnErrorIfDeleteOnReadOnlySource(@TempDir Path tempDir) throws Exc
publicKeyLoader,
asyncRunner,
metricsSystem,
Optional.empty(),
false);
Optional.empty());

final DeleteKeyResult result =
validatorLoader.deleteLocalMutableValidator(dataStructureUtil.randomPublicKey());
Expand Down Expand Up @@ -384,8 +378,7 @@ void shouldInitializeOnlyLocalValidatorsWhenRestDisabled(
publicKeyLoader,
asyncRunner,
metricsSystem,
Optional.empty(),
false);
Optional.empty());

validatorLoader.loadValidators();
final OwnedValidators validators = validatorLoader.getOwnedValidators();
Expand Down Expand Up @@ -440,8 +433,7 @@ void shouldNotInitializeMutableValidatorsWithoutDirectoryStructure(
publicKeyLoader,
asyncRunner,
metricsSystem,
Optional.of(dataDirLayout),
false);
Optional.of(dataDirLayout));

validatorLoader.loadValidators();
final OwnedValidators validators = validatorLoader.getOwnedValidators();
Expand Down Expand Up @@ -477,8 +469,7 @@ void initializeValidatorsWithDuplicateKeysInLocalAndExternalSignersTakesExternal
publicKeyLoader,
asyncRunner,
metricsSystem,
Optional.empty(),
false);
Optional.empty());

validatorLoader.loadValidators();
final OwnedValidators validators = validatorLoader.getOwnedValidators();
Expand Down Expand Up @@ -513,8 +504,7 @@ void shouldEnableSlashingProtectionForLocalValidators(@TempDir Path tempDir) thr
publicKeyLoader,
asyncRunner,
metricsSystem,
Optional.empty(),
false);
Optional.empty());

validatorLoader.loadValidators();
final OwnedValidators validators = validatorLoader.getOwnedValidators();
Expand Down Expand Up @@ -555,8 +545,7 @@ void shouldLoadAdditionalExternalValidatorsOnReload() {
publicKeyLoader,
asyncRunner,
metricsSystem,
Optional.empty(),
false);
Optional.empty());

validatorLoader.loadValidators();
final OwnedValidators validators = validatorLoader.getOwnedValidators();
Expand Down Expand Up @@ -593,8 +582,7 @@ void shouldNotRemoveExternalValidatorsOnReload() {
publicKeyLoader,
asyncRunner,
metricsSystem,
Optional.empty(),
false);
Optional.empty());

validatorLoader.loadValidators();
final OwnedValidators validators = validatorLoader.getOwnedValidators();
Expand Down Expand Up @@ -626,8 +614,7 @@ void shouldLoadAdditionalLocalValidatorsOnReload(final @TempDir Path tempDir) th
publicKeyLoader,
asyncRunner,
metricsSystem,
Optional.empty(),
false);
Optional.empty());

// No validators initially
validatorLoader.loadValidators();
Expand Down Expand Up @@ -662,8 +649,7 @@ void initializeInteropValidatorsWhenInteropIsEnabled() {
publicKeyLoader,
asyncRunner,
metricsSystem,
Optional.empty(),
false);
Optional.empty());
validatorLoader.loadValidators();
final OwnedValidators validators = validatorLoader.getOwnedValidators();

Expand All @@ -684,8 +670,7 @@ void shouldNotLoadMutableValidatorIfNotEnabled() {
publicKeyLoader,
asyncRunner,
metricsSystem,
Optional.empty(),
false);
Optional.empty());
validatorLoader.loadValidators();
final LocalValidatorImportResult result =
validatorLoader.loadLocalMutableValidator(null, "", Optional.empty(), true);
Expand All @@ -710,8 +695,7 @@ void shouldLoadMutableValidatorIfEnabled(@TempDir final Path tempDir) throws Exc
publicKeyLoader,
asyncRunner,
metricsSystem,
Optional.of(new SimpleDataDirLayout(tempDir)),
false);
Optional.of(new SimpleDataDirLayout(tempDir)));
validatorLoader.loadValidators();

final String keystoreString =
Expand Down Expand Up @@ -748,8 +732,7 @@ void doNotInitializeInteropValidatorsWhenInteropIsDisabled() {
publicKeyLoader,
asyncRunner,
metricsSystem,
Optional.empty(),
false);
Optional.empty());
validatorLoader.loadValidators();
final OwnedValidators validators = validatorLoader.getOwnedValidators();

Expand Down

0 comments on commit 93a67c9

Please sign in to comment.