Update limit trie logs validation message for sync-mode=FULL (#7279)

Signed-off-by: Simon Dudley <simon.dudley@consensys.net>

Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
pull/7295/head
Simon Dudley 4 months ago committed by GitHub
parent 4ee14eca1d
commit d2b42d56d8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 6
      besu/src/main/java/org/hyperledger/besu/cli/options/stable/DataStorageOptions.java
  2. 8
      besu/src/test/java/org/hyperledger/besu/cli/options/stable/DataStorageOptionsTest.java

@ -147,8 +147,10 @@ public class DataStorageOptions implements CLIOptions<DataStorageConfiguration>
throw new CommandLine.ParameterException(
commandLine,
String.format(
"Cannot enable " + BONSAI_LIMIT_TRIE_LOGS_ENABLED + " with sync-mode %s",
syncMode));
"Cannot enable %s with sync-mode %s. You must set %s or use a different sync-mode",
BONSAI_LIMIT_TRIE_LOGS_ENABLED,
SyncMode.FULL,
BONSAI_LIMIT_TRIE_LOGS_ENABLED + "=false"));
}
if (bonsaiMaxLayersToLoad < MINIMUM_BONSAI_TRIE_LOG_RETENTION_LIMIT) {
throw new CommandLine.ParameterException(

@ -55,6 +55,14 @@ public class DataStorageOptionsTest
"--bonsai-limit-trie-logs-enabled=false");
}
@Test
public void bonsaiTrieLogPruningWindowSizeShouldBePositive2() {
internalTestFailure(
"Cannot enable --bonsai-limit-trie-logs-enabled with sync-mode FULL. You must set --bonsai-limit-trie-logs-enabled=false or use a different sync-mode",
"--sync-mode",
"FULL");
}
@Test
public void bonsaiTrieLogPruningWindowSizeShouldBePositive() {
internalTestFailure(

Loading…
Cancel
Save