@@ -198,8 +198,7 @@ func testHeaderConcurrentAbortion(t *testing.T, threads int) {
198
198
}
199
199
}
200
200
201
- func TestCalcGasLimit1559 (t * testing.T ) {
202
-
201
+ func TestCalcGasLimit (t * testing.T ) {
203
202
for i , tc := range []struct {
204
203
pGasLimit uint64
205
204
max uint64
@@ -209,23 +208,23 @@ func TestCalcGasLimit1559(t *testing.T) {
209
208
{40000000 , 40039061 , 39960939 },
210
209
} {
211
210
// Increase
212
- if have , want := CalcGasLimit1559 (tc .pGasLimit , 2 * tc .pGasLimit ), tc .max ; have != want {
211
+ if have , want := CalcGasLimit (tc .pGasLimit , 2 * tc .pGasLimit ), tc .max ; have != want {
213
212
t .Errorf ("test %d: have %d want <%d" , i , have , want )
214
213
}
215
214
// Decrease
216
- if have , want := CalcGasLimit1559 (tc .pGasLimit , 0 ), tc .min ; have != want {
215
+ if have , want := CalcGasLimit (tc .pGasLimit , 0 ), tc .min ; have != want {
217
216
t .Errorf ("test %d: have %d want >%d" , i , have , want )
218
217
}
219
218
// Small decrease
220
- if have , want := CalcGasLimit1559 (tc .pGasLimit , tc .pGasLimit - 1 ), tc .pGasLimit - 1 ; have != want {
219
+ if have , want := CalcGasLimit (tc .pGasLimit , tc .pGasLimit - 1 ), tc .pGasLimit - 1 ; have != want {
221
220
t .Errorf ("test %d: have %d want %d" , i , have , want )
222
221
}
223
222
// Small increase
224
- if have , want := CalcGasLimit1559 (tc .pGasLimit , tc .pGasLimit + 1 ), tc .pGasLimit + 1 ; have != want {
223
+ if have , want := CalcGasLimit (tc .pGasLimit , tc .pGasLimit + 1 ), tc .pGasLimit + 1 ; have != want {
225
224
t .Errorf ("test %d: have %d want %d" , i , have , want )
226
225
}
227
226
// No change
228
- if have , want := CalcGasLimit1559 (tc .pGasLimit , tc .pGasLimit ), tc .pGasLimit ; have != want {
227
+ if have , want := CalcGasLimit (tc .pGasLimit , tc .pGasLimit ), tc .pGasLimit ; have != want {
229
228
t .Errorf ("test %d: have %d want %d" , i , have , want )
230
229
}
231
230
}
0 commit comments