Skip to content

Commit

Permalink
simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
StefanBratanov committed Oct 16, 2023
1 parent 8b5e3f8 commit e3a87e7
Showing 1 changed file with 2 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,6 @@ public SafeFuture<SignedValidatorRegistration> createSignedValidatorRegistration
final Validator validator,
final Optional<SignedValidatorRegistration> oldValidatorRegistration,
final Consumer<Throwable> errorHandler) {
return createSignedValidatorRegistration(validator, oldValidatorRegistration)
.whenException(errorHandler);
}

private SafeFuture<SignedValidatorRegistration> createSignedValidatorRegistration(
final Validator validator,
final Optional<SignedValidatorRegistration> oldValidatorRegistration) {

final BLSPublicKey publicKey = validator.getPublicKey();

Expand Down Expand Up @@ -98,7 +91,8 @@ private SafeFuture<SignedValidatorRegistration> createSignedValidatorRegistratio
() -> {
final Signer signer = validator.getSigner();
return signAndCacheValidatorRegistration(publicKey, validatorRegistration, signer);
});
})
.whenException(errorHandler);
}

private SafeFuture<SignedValidatorRegistration> signAndCacheValidatorRegistration(
Expand Down

0 comments on commit e3a87e7

Please sign in to comment.