Remove deprecation message for `--Xp2p-peer-lower-bound` (#7247)

Signed-off-by: Gabriel-Trintinalia <gabriel.trintinalia@consensys.net>
pull/7250/head
Gabriel-Trintinalia 5 months ago committed by GitHub
parent 3026268f15
commit 8c04d0ae36
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 1
      CHANGELOG.md
  2. 4
      besu/src/main/java/org/hyperledger/besu/cli/BesuCommand.java
  3. 15
      besu/src/main/java/org/hyperledger/besu/cli/options/unstable/NetworkingOptions.java

@ -3,6 +3,7 @@
## Next Release ## Next Release
### Breaking Changes ### Breaking Changes
- `Xp2p-peer-lower-bound` has been removed. [#7247](https://github.com/hyperledger/besu/pull/7247)
### Additions and Improvements ### Additions and Improvements
- Support for eth_maxPriorityFeePerGas [#5658](https://github.com/hyperledger/besu/issues/5658) - Support for eth_maxPriorityFeePerGas [#5658](https://github.com/hyperledger/besu/issues/5658)

@ -20,7 +20,6 @@ import static java.util.Arrays.asList;
import static java.util.Collections.singletonList; import static java.util.Collections.singletonList;
import static org.hyperledger.besu.cli.DefaultCommandValues.getDefaultBesuDataPath; import static org.hyperledger.besu.cli.DefaultCommandValues.getDefaultBesuDataPath;
import static org.hyperledger.besu.cli.config.NetworkName.MAINNET; import static org.hyperledger.besu.cli.config.NetworkName.MAINNET;
import static org.hyperledger.besu.cli.options.unstable.NetworkingOptions.PEER_LOWER_BOUND_FLAG;
import static org.hyperledger.besu.cli.util.CommandLineUtils.DEPENDENCY_WARNING_MSG; import static org.hyperledger.besu.cli.util.CommandLineUtils.DEPENDENCY_WARNING_MSG;
import static org.hyperledger.besu.cli.util.CommandLineUtils.isOptionSet; import static org.hyperledger.besu.cli.util.CommandLineUtils.isOptionSet;
import static org.hyperledger.besu.controller.BesuController.DATABASE_PATH; import static org.hyperledger.besu.controller.BesuController.DATABASE_PATH;
@ -1659,9 +1658,6 @@ public class BesuCommand implements DefaultCommandValues, Runnable {
maxPeers = p2PDiscoveryOptionGroup.maxPeers; maxPeers = p2PDiscoveryOptionGroup.maxPeers;
final Boolean isLimitRemoteWireConnectionsEnabled = final Boolean isLimitRemoteWireConnectionsEnabled =
p2PDiscoveryOptionGroup.isLimitRemoteWireConnectionsEnabled; p2PDiscoveryOptionGroup.isLimitRemoteWireConnectionsEnabled;
if (isOptionSet(commandLine, PEER_LOWER_BOUND_FLAG)) {
logger.warn(PEER_LOWER_BOUND_FLAG + " is deprecated and will be removed soon.");
}
if (isLimitRemoteWireConnectionsEnabled) { if (isLimitRemoteWireConnectionsEnabled) {
final float fraction = final float fraction =
Fraction.fromPercentage(p2PDiscoveryOptionGroup.maxRemoteConnectionsPercentage) Fraction.fromPercentage(p2PDiscoveryOptionGroup.maxRemoteConnectionsPercentage)

@ -14,7 +14,6 @@
*/ */
package org.hyperledger.besu.cli.options.unstable; package org.hyperledger.besu.cli.options.unstable;
import org.hyperledger.besu.cli.DefaultCommandValues;
import org.hyperledger.besu.cli.options.CLIOptions; import org.hyperledger.besu.cli.options.CLIOptions;
import org.hyperledger.besu.cli.options.OptionParser; import org.hyperledger.besu.cli.options.OptionParser;
import org.hyperledger.besu.ethereum.p2p.config.NetworkingConfiguration; import org.hyperledger.besu.ethereum.p2p.config.NetworkingConfiguration;
@ -27,9 +26,6 @@ import picocli.CommandLine;
/** The Networking Cli options. */ /** The Networking Cli options. */
public class NetworkingOptions implements CLIOptions<NetworkingConfiguration> { public class NetworkingOptions implements CLIOptions<NetworkingConfiguration> {
/** The constant PEER_LOWER_BOUND_FLAG */
public static final String PEER_LOWER_BOUND_FLAG = "--Xp2p-peer-lower-bound";
private final String INITIATE_CONNECTIONS_FREQUENCY_FLAG = private final String INITIATE_CONNECTIONS_FREQUENCY_FLAG =
"--Xp2p-initiate-connections-frequency"; "--Xp2p-initiate-connections-frequency";
private final String CHECK_MAINTAINED_CONNECTIONS_FREQUENCY_FLAG = private final String CHECK_MAINTAINED_CONNECTIONS_FREQUENCY_FLAG =
@ -77,13 +73,6 @@ public class NetworkingOptions implements CLIOptions<NetworkingConfiguration> {
description = "Whether to enable filtering of peers based on the ENR field ForkId)") description = "Whether to enable filtering of peers based on the ENR field ForkId)")
private final Boolean filterOnEnrForkId = NetworkingConfiguration.DEFAULT_FILTER_ON_ENR_FORK_ID; private final Boolean filterOnEnrForkId = NetworkingConfiguration.DEFAULT_FILTER_ON_ENR_FORK_ID;
@CommandLine.Option(
hidden = true,
names = PEER_LOWER_BOUND_FLAG,
description =
"(Deprecated) Lower bound on the target number of P2P connections (default: ${DEFAULT-VALUE})")
private final Integer peerLowerBoundConfig = DefaultCommandValues.DEFAULT_MAX_PEERS;
private NetworkingOptions() {} private NetworkingOptions() {}
/** /**
@ -130,9 +119,7 @@ public class NetworkingOptions implements CLIOptions<NetworkingConfiguration> {
CHECK_MAINTAINED_CONNECTIONS_FREQUENCY_FLAG, CHECK_MAINTAINED_CONNECTIONS_FREQUENCY_FLAG,
OptionParser.format(checkMaintainedConnectionsFrequencySec), OptionParser.format(checkMaintainedConnectionsFrequencySec),
INITIATE_CONNECTIONS_FREQUENCY_FLAG, INITIATE_CONNECTIONS_FREQUENCY_FLAG,
OptionParser.format(initiateConnectionsFrequencySec), OptionParser.format(initiateConnectionsFrequencySec));
PEER_LOWER_BOUND_FLAG,
OptionParser.format((peerLowerBoundConfig)));
if (dnsDiscoveryServerOverride.isPresent()) { if (dnsDiscoveryServerOverride.isPresent()) {
retval.add(DNS_DISCOVERY_SERVER_OVERRIDE_FLAG); retval.add(DNS_DISCOVERY_SERVER_OVERRIDE_FLAG);

Loading…
Cancel
Save