From e3a87e7a8ba5d56ba58b0b318d509bf7761bc711 Mon Sep 17 00:00:00 2001 From: Stefan Bratanov Date: Mon, 16 Oct 2023 17:32:20 +0100 Subject: [PATCH] simplify --- .../client/SignedValidatorRegistrationFactory.java | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/validator/client/src/main/java/tech/pegasys/teku/validator/client/SignedValidatorRegistrationFactory.java b/validator/client/src/main/java/tech/pegasys/teku/validator/client/SignedValidatorRegistrationFactory.java index 7e411b6fb7e..aaba3422b4d 100644 --- a/validator/client/src/main/java/tech/pegasys/teku/validator/client/SignedValidatorRegistrationFactory.java +++ b/validator/client/src/main/java/tech/pegasys/teku/validator/client/SignedValidatorRegistrationFactory.java @@ -46,13 +46,6 @@ public SafeFuture createSignedValidatorRegistration final Validator validator, final Optional oldValidatorRegistration, final Consumer errorHandler) { - return createSignedValidatorRegistration(validator, oldValidatorRegistration) - .whenException(errorHandler); - } - - private SafeFuture createSignedValidatorRegistration( - final Validator validator, - final Optional oldValidatorRegistration) { final BLSPublicKey publicKey = validator.getPublicKey(); @@ -98,7 +91,8 @@ private SafeFuture createSignedValidatorRegistratio () -> { final Signer signer = validator.getSigner(); return signAndCacheValidatorRegistration(publicKey, validatorRegistration, signer); - }); + }) + .whenException(errorHandler); } private SafeFuture signAndCacheValidatorRegistration(