@@ -703,24 +703,6 @@ func TestUtilityFunctions(t *testing.T) {
703703 require .Equal (input , reconstructed )
704704 })
705705
706- t .Run ("ExponentialBackoff" , func (t * testing.T ) {
707- require := require .New (t )
708- m , _ := getManager (t , mocks .NewMockDA (t ), - 1 , - 1 )
709- m .config .DA .BlockTime .Duration = 10 * time .Second
710-
711- // Test initial backoff
712- result := m .exponentialBackoff (0 )
713- require .Equal (initialBackoff , result )
714-
715- // Test doubling
716- result = m .exponentialBackoff (100 * time .Millisecond )
717- require .Equal (200 * time .Millisecond , result )
718-
719- // Test max cap
720- result = m .exponentialBackoff (20 * time .Second )
721- require .Equal (m .config .DA .BlockTime .Duration , result )
722- })
723-
724706 t .Run ("GetHeaderSignature_NilSigner" , func (t * testing.T ) {
725707 require := require .New (t )
726708 m , _ := getManager (t , mocks .NewMockDA (t ), - 1 , - 1 )
@@ -993,44 +975,10 @@ func TestValidationMethods(t *testing.T) {
993975 require .False (result )
994976 })
995977
996- t .Run ("ExponentialBackoff_WithConfig" , func (t * testing.T ) {
997- require := require .New (t )
998- m , _ := getManager (t , mocks .NewMockDA (t ), - 1 , - 1 )
999-
1000- // Set up a config with a specific block time
1001- m .config .DA .BlockTime .Duration = 5 * time .Second
1002-
1003- // Test that backoff is capped at config value
1004- result := m .exponentialBackoff (10 * time .Second )
1005- require .Equal (5 * time .Second , result )
1006-
1007- // Test normal doubling
1008- result = m .exponentialBackoff (100 * time .Millisecond )
1009- require .Equal (200 * time .Millisecond , result )
1010- })
1011978}
1012979
1013980// TestConfigurationDefaults tests default value handling and edge cases
1014981func TestConfigurationDefaults (t * testing.T ) {
1015- t .Run ("ExponentialBackoff_EdgeCases" , func (t * testing.T ) {
1016- require := require .New (t )
1017- m , _ := getManager (t , mocks .NewMockDA (t ), - 1 , - 1 )
1018-
1019- // Test with zero block time - should still double the backoff since there's no cap
1020- m .config .DA .BlockTime .Duration = 0
1021- result := m .exponentialBackoff (100 * time .Millisecond )
1022- require .Equal (0 * time .Millisecond , result ) // Capped at 0
1023-
1024- // Test with very small block time
1025- m .config .DA .BlockTime .Duration = 1 * time .Millisecond
1026- result = m .exponentialBackoff (100 * time .Millisecond )
1027- require .Equal (1 * time .Millisecond , result ) // Should cap at block time
1028-
1029- // Test normal doubling with larger block time
1030- m .config .DA .BlockTime .Duration = 1 * time .Second
1031- result = m .exponentialBackoff (100 * time .Millisecond )
1032- require .Equal (200 * time .Millisecond , result ) // Should double
1033- })
1034982
1035983 t .Run ("IsProposer_NilSigner" , func (t * testing.T ) {
1036984 require := require .New (t )
0 commit comments