From 15b6bdf712f32601ae37adc984a5c53f629fa523 Mon Sep 17 00:00:00 2001 From: Matilda Clerke Date: Wed, 18 Sep 2024 12:39:54 +1000 Subject: [PATCH] 7311: Move --Xpeertask-system-enabled out of BesuCommand and make hidden Signed-off-by: Matilda Clerke --- .../java/org/hyperledger/besu/cli/BesuCommand.java | 8 -------- .../besu/cli/options/stable/P2PTLSConfigOptions.java | 10 ++++++++++ 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/besu/src/main/java/org/hyperledger/besu/cli/BesuCommand.java b/besu/src/main/java/org/hyperledger/besu/cli/BesuCommand.java index ba1eb4b0a2..e103f1e68d 100644 --- a/besu/src/main/java/org/hyperledger/besu/cli/BesuCommand.java +++ b/besu/src/main/java/org/hyperledger/besu/cli/BesuCommand.java @@ -843,12 +843,6 @@ public class BesuCommand implements DefaultCommandValues, Runnable { description = "Specifies the number of last blocks to cache (default: ${DEFAULT-VALUE})") private final Integer numberOfblocksToCache = 0; - @Option( - names = {"--Xpeertask-system-enabled"}, - description = - "Temporary feature toggle to enable using the new peertask system (default: ${DEFAULT-VALUE})") - private final Boolean isPeerTaskSystemEnabled = false; - @Mixin private P2PTLSConfigOptions p2pTLSConfigOptions; // Plugins Configuration Option Group @@ -1791,8 +1785,6 @@ public class BesuCommand implements DefaultCommandValues, Runnable { instantiateSignatureAlgorithmFactory(); - PeerTaskFeatureToggle.initialize(isPeerTaskSystemEnabled); - logger.info(generateConfigurationOverview()); logger.info("Security Module: {}", securityModuleName); } diff --git a/besu/src/main/java/org/hyperledger/besu/cli/options/stable/P2PTLSConfigOptions.java b/besu/src/main/java/org/hyperledger/besu/cli/options/stable/P2PTLSConfigOptions.java index c3f8c56219..440d65b5a2 100644 --- a/besu/src/main/java/org/hyperledger/besu/cli/options/stable/P2PTLSConfigOptions.java +++ b/besu/src/main/java/org/hyperledger/besu/cli/options/stable/P2PTLSConfigOptions.java @@ -20,6 +20,7 @@ import static org.hyperledger.besu.cli.DefaultCommandValues.MANDATORY_FILE_FORMA import org.hyperledger.besu.cli.util.CommandLineUtils; import org.hyperledger.besu.ethereum.api.tls.FileBasedPasswordProvider; +import org.hyperledger.besu.ethereum.eth.manager.peertask.PeerTaskFeatureToggle; import org.hyperledger.besu.ethereum.p2p.rlpx.connections.netty.TLSConfiguration; import java.nio.file.Path; @@ -103,6 +104,13 @@ public class P2PTLSConfigOptions { "Whether to send a SNI header in the TLS ClientHello message (default: ${DEFAULT-VALUE})") private final Boolean p2pTlsClientHelloSniHeaderEnabled = false; + @Option( + names = {"--Xpeertask-system-enabled"}, + hidden = true, + description = + "Temporary feature toggle to enable using the new peertask system (default: ${DEFAULT-VALUE})") + private final Boolean isPeerTaskSystemEnabled = false; + /** Default constructor. */ P2PTLSConfigOptions() {} @@ -128,6 +136,8 @@ public class P2PTLSConfigOptions { "File containing password to unlock keystore is required when p2p TLS is enabled"); } + PeerTaskFeatureToggle.initialize(isPeerTaskSystemEnabled); + return Optional.of( TLSConfiguration.Builder.tlsConfiguration() .withKeyStoreType(p2pTLSKeyStoreType)