From 8b3b57de780d857b021aaf175781884cb37437fe Mon Sep 17 00:00:00 2001 From: Sally MacFarlane Date: Mon, 4 Mar 2024 08:56:27 +1000 Subject: [PATCH] allow snap with clique (#6667) Signed-off-by: Sally MacFarlane --- .../main/java/org/hyperledger/besu/cli/BesuCommand.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 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 0d7bf07da3..2601a04be6 100644 --- a/besu/src/main/java/org/hyperledger/besu/cli/BesuCommand.java +++ b/besu/src/main/java/org/hyperledger/besu/cli/BesuCommand.java @@ -1606,8 +1606,11 @@ public class BesuCommand implements DefaultCommandValues, Runnable { throw new ParameterException( this.commandLine, "Unable to load genesis file. " + e.getCause()); } - if (genesisConfigOptions.isPoa()) { - final String errorSuffix = "can't be used with PoA networks"; + // snap and checkpoint can't be used with BFT but can for clique + 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)) { throw new ParameterException( commandLine, String.format("%s %s", "Checkpoint sync", errorSuffix));