diff --git a/CHANGELOG.md b/CHANGELOG.md index ff4d7cfbf94..6b5cc10f714 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ ### Additions and Improvements - Remove privacy test classes support [#7569](https://github.com/hyperledger/besu/pull/7569) +- Set default value for sync-min-peers to 1 ### Bug fixes - Fix mounted data path directory permissions for besu user [#7575](https://github.com/hyperledger/besu/pull/7575) diff --git a/besu/src/main/java/org/hyperledger/besu/cli/DefaultCommandValues.java b/besu/src/main/java/org/hyperledger/besu/cli/DefaultCommandValues.java index ba05f455246..e1fc839c340 100644 --- a/besu/src/main/java/org/hyperledger/besu/cli/DefaultCommandValues.java +++ b/besu/src/main/java/org/hyperledger/besu/cli/DefaultCommandValues.java @@ -89,7 +89,7 @@ public interface DefaultCommandValues { JwtAlgorithm DEFAULT_JWT_ALGORITHM = JwtAlgorithm.RS256; /** The constant SYNC_MIN_PEER_COUNT. */ - int SYNC_MIN_PEER_COUNT = 5; + int SYNC_MIN_PEER_COUNT = 1; /** The constant DEFAULT_MAX_PEERS. */ int DEFAULT_MAX_PEERS = 25; 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 99b45ada1b8..e8a3d1e1c71 100644 --- a/besu/src/test/java/org/hyperledger/besu/cli/BesuCommandTest.java +++ b/besu/src/test/java/org/hyperledger/besu/cli/BesuCommandTest.java @@ -1245,7 +1245,7 @@ public void checkValidDefaultFastSyncMinPeers() { final SynchronizerConfiguration syncConfig = syncConfigurationCaptor.getValue(); assertThat(syncConfig.getSyncMode()).isEqualTo(SyncMode.FAST); - assertThat(syncConfig.getSyncMinimumPeerCount()).isEqualTo(5); + assertThat(syncConfig.getSyncMinimumPeerCount()).isEqualTo(1); assertThat(commandOutput.toString(UTF_8)).isEmpty(); assertThat(commandErrorOutput.toString(UTF_8)).isEmpty(); } diff --git a/besu/src/test/java/org/hyperledger/besu/cli/CascadingDefaultProviderTest.java b/besu/src/test/java/org/hyperledger/besu/cli/CascadingDefaultProviderTest.java index 4cdd8163d95..70e6bdbfb49 100644 --- a/besu/src/test/java/org/hyperledger/besu/cli/CascadingDefaultProviderTest.java +++ b/besu/src/test/java/org/hyperledger/besu/cli/CascadingDefaultProviderTest.java @@ -182,7 +182,7 @@ public void noOverrideDefaultValuesIfKeyIsNotPresentInConfigFile() { final SynchronizerConfiguration syncConfig = syncConfigurationCaptor.getValue(); assertThat(syncConfig.getSyncMode()).isEqualTo(SyncMode.SNAP); - assertThat(syncConfig.getSyncMinimumPeerCount()).isEqualTo(5); + assertThat(syncConfig.getSyncMinimumPeerCount()).isEqualTo(1); assertThat(commandOutput.toString(UTF_8)).isEmpty(); assertThat(commandErrorOutput.toString(UTF_8)).isEmpty();