Skip to content

Commit 9db4e04

Browse files
author
colinlyguo
committed
Revert "fix coordinator unit tests"
This reverts commit a953414.
1 parent a953414 commit 9db4e04

File tree

1 file changed

+11
-15
lines changed

1 file changed

+11
-15
lines changed

coordinator/test/api_test.go

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -87,13 +87,13 @@ func setupCoordinator(t *testing.T, proversPerSession uint8, coordinatorURL stri
8787
LowVersionCircuit: &config.CircuitConfig{
8888
ParamsPath: "",
8989
AssetsPath: "",
90-
ForkName: "darwin",
90+
ForkName: "homestead",
9191
MinProverVersion: "v4.2.0",
9292
},
9393
HighVersionCircuit: &config.CircuitConfig{
9494
ParamsPath: "",
9595
AssetsPath: "",
96-
ForkName: "darwinV2",
96+
ForkName: "bernoulli",
9797
MinProverVersion: "v4.3.0",
9898
},
9999
},
@@ -109,16 +109,12 @@ func setupCoordinator(t *testing.T, proversPerSession uint8, coordinatorURL stri
109109
}
110110

111111
var chainConf params.ChainConfig
112-
chainConf.LondonBlock = big.NewInt(0)
113-
chainConf.BernoulliBlock = big.NewInt(0)
114-
chainConf.CurieBlock = big.NewInt(0)
115112
for _, forkName := range forks {
116113
switch forkName {
117-
case "darwinV2":
118-
chainConf.DarwinTime = new(uint64)
119-
chainConf.DarwinV2Time = new(uint64)
120-
case "darwin":
121-
chainConf.DarwinTime = new(uint64)
114+
case "bernoulli":
115+
chainConf.BernoulliBlock = big.NewInt(100)
116+
case "homestead":
117+
chainConf.HomesteadBlock = big.NewInt(0)
122118
}
123119
}
124120

@@ -201,7 +197,7 @@ func TestApis(t *testing.T) {
201197
func testHandshake(t *testing.T) {
202198
// Setup coordinator and http server.
203199
coordinatorURL := randomURL()
204-
proofCollector, httpHandler := setupCoordinator(t, 1, coordinatorURL, []string{"darwinV2"})
200+
proofCollector, httpHandler := setupCoordinator(t, 1, coordinatorURL, []string{"homestead"})
205201
defer func() {
206202
proofCollector.Stop()
207203
assert.NoError(t, httpHandler.Shutdown(context.Background()))
@@ -214,7 +210,7 @@ func testHandshake(t *testing.T) {
214210
func testFailedHandshake(t *testing.T) {
215211
// Setup coordinator and http server.
216212
coordinatorURL := randomURL()
217-
proofCollector, httpHandler := setupCoordinator(t, 1, coordinatorURL, []string{"darwinV2"})
213+
proofCollector, httpHandler := setupCoordinator(t, 1, coordinatorURL, []string{"homestead"})
218214
defer func() {
219215
proofCollector.Stop()
220216
}()
@@ -232,7 +228,7 @@ func testFailedHandshake(t *testing.T) {
232228

233229
func testGetTaskBlocked(t *testing.T) {
234230
coordinatorURL := randomURL()
235-
collector, httpHandler := setupCoordinator(t, 3, coordinatorURL, []string{"darwinV2"})
231+
collector, httpHandler := setupCoordinator(t, 3, coordinatorURL, []string{"homestead"})
236232
defer func() {
237233
collector.Stop()
238234
assert.NoError(t, httpHandler.Shutdown(context.Background()))
@@ -276,7 +272,7 @@ func testGetTaskBlocked(t *testing.T) {
276272

277273
func testOutdatedProverVersion(t *testing.T) {
278274
coordinatorURL := randomURL()
279-
collector, httpHandler := setupCoordinator(t, 3, coordinatorURL, []string{"darwinV2"})
275+
collector, httpHandler := setupCoordinator(t, 3, coordinatorURL, []string{"homestead"})
280276
defer func() {
281277
collector.Stop()
282278
assert.NoError(t, httpHandler.Shutdown(context.Background()))
@@ -303,7 +299,7 @@ func testOutdatedProverVersion(t *testing.T) {
303299

304300
func testValidProof(t *testing.T) {
305301
coordinatorURL := randomURL()
306-
collector, httpHandler := setupCoordinator(t, 3, coordinatorURL, []string{"darwinV2"})
302+
collector, httpHandler := setupCoordinator(t, 3, coordinatorURL, []string{"homestead"})
307303
defer func() {
308304
collector.Stop()
309305
assert.NoError(t, httpHandler.Shutdown(context.Background()))

0 commit comments

Comments
 (0)