allow snap with clique (#6667)

Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
sally-delete-me-2
Sally MacFarlane 9 months ago committed by GitHub
parent 02406ba6f9
commit 8b3b57de78
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 7
      besu/src/main/java/org/hyperledger/besu/cli/BesuCommand.java

@ -1606,8 +1606,11 @@ public class BesuCommand implements DefaultCommandValues, Runnable {
throw new ParameterException( throw new ParameterException(
this.commandLine, "Unable to load genesis file. " + e.getCause()); this.commandLine, "Unable to load genesis file. " + e.getCause());
} }
if (genesisConfigOptions.isPoa()) { // snap and checkpoint can't be used with BFT but can for clique
final String errorSuffix = "can't be used with PoA networks"; if (genesisConfigOptions.isIbftLegacy()
|| genesisConfigOptions.isIbft2()
|| genesisConfigOptions.isQbft()) {
final String errorSuffix = "can't be used with BFT networks";
if (SyncMode.CHECKPOINT.equals(syncMode) || SyncMode.X_CHECKPOINT.equals(syncMode)) { if (SyncMode.CHECKPOINT.equals(syncMode) || SyncMode.X_CHECKPOINT.equals(syncMode)) {
throw new ParameterException( throw new ParameterException(
commandLine, String.format("%s %s", "Checkpoint sync", errorSuffix)); commandLine, String.format("%s %s", "Checkpoint sync", errorSuffix));

Loading…
Cancel
Save