@@ -66,7 +66,12 @@ func TestSequentialAnnouncementsLes2(t *testing.T) { testSequentialAnnouncements
66
66
func TestSequentialAnnouncementsLes3 (t * testing.T ) { testSequentialAnnouncements (t , 3 ) }
67
67
68
68
func testSequentialAnnouncements (t * testing.T , protocol int ) {
69
- s , c , teardown := newClientServerEnv (t , 4 , protocol , nil , nil , 0 , false , false , true )
69
+ netconfig := testnetConfig {
70
+ blocks : 4 ,
71
+ protocol : protocol ,
72
+ nopruning : true ,
73
+ }
74
+ s , c , teardown := newClientServerEnv (t , netconfig )
70
75
defer teardown ()
71
76
72
77
// Create connected peer pair.
@@ -101,7 +106,12 @@ func TestGappedAnnouncementsLes2(t *testing.T) { testGappedAnnouncements(t, 2) }
101
106
func TestGappedAnnouncementsLes3 (t * testing.T ) { testGappedAnnouncements (t , 3 ) }
102
107
103
108
func testGappedAnnouncements (t * testing.T , protocol int ) {
104
- s , c , teardown := newClientServerEnv (t , 4 , protocol , nil , nil , 0 , false , false , true )
109
+ netconfig := testnetConfig {
110
+ blocks : 4 ,
111
+ protocol : protocol ,
112
+ nopruning : true ,
113
+ }
114
+ s , c , teardown := newClientServerEnv (t , netconfig )
105
115
defer teardown ()
106
116
107
117
// Create connected peer pair.
@@ -183,7 +193,13 @@ func testTrustedAnnouncement(t *testing.T, protocol int) {
183
193
ids = append (ids , n .String ())
184
194
}
185
195
}
186
- _ , c , teardown := newClientServerEnv (t , 0 , protocol , nil , ids , 60 , false , false , true )
196
+ netconfig := testnetConfig {
197
+ protocol : protocol ,
198
+ nopruning : true ,
199
+ ulcServers : ids ,
200
+ ulcFraction : 60 ,
201
+ }
202
+ _ , c , teardown := newClientServerEnv (t , netconfig )
187
203
defer teardown ()
188
204
defer func () {
189
205
for i := 0 ; i < len (teardowns ); i ++ {
@@ -233,8 +249,17 @@ func testTrustedAnnouncement(t *testing.T, protocol int) {
233
249
check ([]uint64 {10 }, 10 , func () { <- newHead }) // Sync the whole chain.
234
250
}
235
251
236
- func TestInvalidAnnounces (t * testing.T ) {
237
- s , c , teardown := newClientServerEnv (t , 4 , lpv3 , nil , nil , 0 , false , false , true )
252
+ func TestInvalidAnnouncesLES2 (t * testing.T ) { testInvalidAnnounces (t , lpv2 ) }
253
+ func TestInvalidAnnouncesLES3 (t * testing.T ) { testInvalidAnnounces (t , lpv3 ) }
254
+ func TestInvalidAnnouncesLES4 (t * testing.T ) { testInvalidAnnounces (t , lpv4 ) }
255
+
256
+ func testInvalidAnnounces (t * testing.T , protocol int ) {
257
+ netconfig := testnetConfig {
258
+ blocks : 4 ,
259
+ protocol : protocol ,
260
+ nopruning : true ,
261
+ }
262
+ s , c , teardown := newClientServerEnv (t , netconfig )
238
263
defer teardown ()
239
264
240
265
// Create connected peer pair.
0 commit comments