@@ -230,6 +230,12 @@ func (e *testEnv) waitFor(f func(n *kit.TestFullNode) bool, timeout time.Duratio
230
230
// a miner. The last return value is the manifest sender for the network.
231
231
func setup (t * testing.T , blocktime time.Duration ) * testEnv {
232
232
manif := lf3 .NewManifest (BaseNetworkName + "/1" , DefaultFinality , DefaultBootstrapEpoch , blocktime , cid .Undef )
233
+ manif .Gpbft .Delta = 250 * time .Millisecond
234
+ manif .Gpbft .DeltaBackOffExponent = 1.3
235
+ manif .Gpbft .RebroadcastBackoffBase = manif .Gpbft .Delta * 2
236
+ manif .Gpbft .RebroadcastBackoffMax = manif .Gpbft .RebroadcastBackoffBase * 2
237
+ manif .Gpbft .RebroadcastBackoffExponent = manif .Gpbft .DeltaBackOffExponent
238
+
233
239
return setupWithStaticManifest (t , manif , false )
234
240
}
235
241
@@ -295,14 +301,23 @@ func setupWithStaticManifest(t *testing.T, manif *manifest.Manifest, testBootstr
295
301
err = n .NetConnect (ctx , e .ms .PeerInfo ())
296
302
require .NoError (t , err )
297
303
}
298
-
299
304
errgrp .Go (func () error {
300
305
defer func () {
301
306
require .NoError (t , manifestServerHost .Close ())
302
307
}()
303
308
return e .ms .Run (ctx )
304
309
})
305
310
311
+ // Update initial manifest params to shorten the timeouts and backoff for
312
+ // testing.
313
+ m .Gpbft .Delta = 250 * time .Millisecond
314
+ m .Gpbft .DeltaBackOffExponent = 1.3
315
+ m .Gpbft .RebroadcastBackoffBase = manif .Gpbft .Delta * 2
316
+ m .Gpbft .RebroadcastBackoffMax = manif .Gpbft .RebroadcastBackoffBase * 2
317
+ m .Gpbft .RebroadcastBackoffExponent = manif .Gpbft .DeltaBackOffExponent
318
+ e .ms .UpdateManifest (m )
319
+ e .waitTillManifestChange (m , 20 * time .Second )
320
+
306
321
return e
307
322
}
308
323
0 commit comments