@ -882,7 +882,7 @@ public class BesuCommandTest extends CommandTestAbstract {
final SynchronizerConfiguration syncConfig = syncConfigurationCaptor . getValue ( ) ;
final SynchronizerConfiguration syncConfig = syncConfigurationCaptor . getValue ( ) ;
assertThat ( syncConfig . getSyncMode ( ) ) . isEqualTo ( SyncMode . FAST ) ;
assertThat ( syncConfig . getSyncMode ( ) ) . isEqualTo ( SyncMode . FAST ) ;
assertThat ( syncConfig . getFastSyncMinimumPeerCount ( ) ) . isEqualTo ( 5 ) ;
assertThat ( syncConfig . getFastSyncMinimumPeerCount ( ) ) . isEqualTo ( 1 ) ;
assertThat ( commandErrorOutput . toString ( UTF_8 ) ) . isEmpty ( ) ;
assertThat ( commandErrorOutput . toString ( UTF_8 ) ) . isEmpty ( ) ;
@ -1709,19 +1709,19 @@ public class BesuCommandTest extends CommandTestAbstract {
}
}
@Test
@Test
public void checkValidDefaultFastSyncMinPeersOption ( ) {
public void checkValidDefaultFastSyncMinPeersPoS ( ) {
parseCommand ( "--sync-mode" , "FAST" ) ;
parseCommand ( "--sync-mode" , "FAST" , "--network" , "MAINNET" ) ;
verify ( mockControllerBuilder ) . synchronizerConfiguration ( syncConfigurationCaptor . capture ( ) ) ;
verify ( mockControllerBuilder ) . synchronizerConfiguration ( syncConfigurationCaptor . capture ( ) ) ;
final SynchronizerConfiguration syncConfig = syncConfigurationCaptor . getValue ( ) ;
final SynchronizerConfiguration syncConfig = syncConfigurationCaptor . getValue ( ) ;
assertThat ( syncConfig . getSyncMode ( ) ) . isEqualTo ( SyncMode . FAST ) ;
assertThat ( syncConfig . getSyncMode ( ) ) . isEqualTo ( SyncMode . FAST ) ;
assertThat ( syncConfig . getFastSyncMinimumPeerCount ( ) ) . isEqualTo ( 5 ) ;
assertThat ( syncConfig . getFastSyncMinimumPeerCount ( ) ) . isEqualTo ( 1 ) ;
assertThat ( commandOutput . toString ( UTF_8 ) ) . isEmpty ( ) ;
assertThat ( commandOutput . toString ( UTF_8 ) ) . isEmpty ( ) ;
assertThat ( commandErrorOutput . toString ( UTF_8 ) ) . isEmpty ( ) ;
assertThat ( commandErrorOutput . toString ( UTF_8 ) ) . isEmpty ( ) ;
}
}
@Test
@Test
public void checkValidDefaultFastSyncMinPeersPreMergeOption ( ) {
public void checkValidDefaultFastSyncMinPeersPoW ( ) {
parseCommand ( "--sync-mode" , "FAST" , "--network" , "CLASSIC" ) ;
parseCommand ( "--sync-mode" , "FAST" , "--network" , "CLASSIC" ) ;
verify ( mockControllerBuilder ) . synchronizerConfiguration ( syncConfigurationCaptor . capture ( ) ) ;
verify ( mockControllerBuilder ) . synchronizerConfiguration ( syncConfigurationCaptor . capture ( ) ) ;
@ -1732,18 +1732,6 @@ public class BesuCommandTest extends CommandTestAbstract {
assertThat ( commandErrorOutput . toString ( UTF_8 ) ) . isEmpty ( ) ;
assertThat ( commandErrorOutput . toString ( UTF_8 ) ) . isEmpty ( ) ;
}
}
@Test
public void checkValidDefaultFastSyncMinPeersPostMergeOption ( ) {
parseCommand ( "--sync-mode" , "FAST" , "--network" , "GOERLI" ) ;
verify ( mockControllerBuilder ) . synchronizerConfiguration ( syncConfigurationCaptor . capture ( ) ) ;
final SynchronizerConfiguration syncConfig = syncConfigurationCaptor . getValue ( ) ;
assertThat ( syncConfig . getSyncMode ( ) ) . isEqualTo ( SyncMode . FAST ) ;
assertThat ( syncConfig . getFastSyncMinimumPeerCount ( ) ) . isEqualTo ( 1 ) ;
assertThat ( commandOutput . toString ( UTF_8 ) ) . isEmpty ( ) ;
assertThat ( commandErrorOutput . toString ( UTF_8 ) ) . isEmpty ( ) ;
}
@Test
@Test
public void parsesValidFastSyncMinPeersOption ( ) {
public void parsesValidFastSyncMinPeersOption ( ) {
parseCommand ( "--sync-mode" , "FAST" , "--fast-sync-min-peers" , "11" ) ;
parseCommand ( "--sync-mode" , "FAST" , "--fast-sync-min-peers" , "11" ) ;