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