Skip to content

Commit

Permalink
simplify --min-gas-price dependency check (hyperledger#2582)
Browse files Browse the repository at this point in the history
Signed-off-by: Sally MacFarlane <sally.macfarlane@consensys.net>
  • Loading branch information
macfarla authored Jul 28, 2021
1 parent 0a04d84 commit 1868d3c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
8 changes: 1 addition & 7 deletions besu/src/main/java/org/hyperledger/besu/cli/BesuCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -1558,19 +1558,13 @@ private void issueOptionWarnings() {
!isMiningEnabled,
asList(
"--miner-coinbase",
"--min-gas-price",
"--min-block-occupancy-ratio",
"--miner-extra-data",
"--miner-stratum-enabled",
"--Xminer-remote-sealers-limit",
"--Xminer-remote-sealers-hashrate-ttl"));

CommandLineUtils.checkMultiOptionDependencies(
logger,
commandLine,
"--min-gas-price ignored because none of --miner-enabled or isQuorum (in genesis file) was defined.",
List.of(!isMiningEnabled, !isGoQuorumCompatibilityMode),
singletonList("--min-gas-price"));

CommandLineUtils.checkOptionDependencies(
logger,
commandLine,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3003,8 +3003,7 @@ public void miningOptionsRequiresServiceToBeEnabled() {
public void minGasPriceRequiresMainOption() {
parseCommand("--min-gas-price", "0");

verifyMultiOptionsConstraintLoggerCall(
"--min-gas-price ignored because none of --miner-enabled or isQuorum (in genesis file) was defined.");
verifyOptionsConstraintLoggerCall("--miner-enabled", "--min-gas-price");

assertThat(commandOutput.toString()).isEmpty();
assertThat(commandErrorOutput.toString()).isEmpty();
Expand Down

0 comments on commit 1868d3c

Please sign in to comment.