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 7f18aa4e8e..b16e9ebb5b 100644 --- a/besu/src/main/java/org/hyperledger/besu/cli/BesuCommand.java +++ b/besu/src/main/java/org/hyperledger/besu/cli/BesuCommand.java @@ -2041,6 +2041,10 @@ public class BesuCommand implements DefaultCommandValues, Runnable { if (isPruningEnabled()) { throw new ParameterException(commandLine, String.format("%s %s", "Pruning", errorSuffix)); } + if (isGoQuorumCompatibilityMode) { + throw new ParameterException( + commandLine, String.format("%s %s", "GoQuorum mode", errorSuffix)); + } if (isPrivacyMultiTenancyEnabled && !jsonRpcConfiguration.isAuthenticationEnabled() diff --git a/besu/src/test/java/org/hyperledger/besu/cli/BesuCommandTest.java b/besu/src/test/java/org/hyperledger/besu/cli/BesuCommandTest.java index 72a8ce8156..34bcff7309 100644 --- a/besu/src/test/java/org/hyperledger/besu/cli/BesuCommandTest.java +++ b/besu/src/test/java/org/hyperledger/besu/cli/BesuCommandTest.java @@ -3413,6 +3413,23 @@ public class BesuCommandTest extends CommandTestAbstract { assertThat(commandOutput.toString()).isEmpty(); } + @Test + public void privacyWithGoQuorumModeMustError() throws IOException { + final Path genesisFile = + createFakeGenesisFile(VALID_GENESIS_QUORUM_INTEROP_ENABLED_WITH_CHAINID); + parseCommand( + "--goquorum-compatibility-enabled", + "--privacy-enabled", + "--genesis-file", + genesisFile.toString(), + "--min-gas-price", + "0"); + + assertThat(commandErrorOutput.toString()) + .contains("GoQuorum mode cannot be enabled with privacy."); + assertThat(commandOutput.toString()).isEmpty(); + } + @Rule public TemporaryFolder testFolder = new TemporaryFolder(); @Test