@@ -225,7 +225,7 @@ func TestCalcBaseFee(t *testing.T) {
225225 big .NewInt (1000000000 ),
226226 10000000 ,
227227 10000000 ,
228- big .NewInt (1000000000 ),
228+ big .NewInt (999999999 ), // baseFee diff is -1 when usage == target
229229 },
230230 {
231231 params .EIP1559ChainConfig ,
@@ -308,7 +308,7 @@ func TestCalcBaseFee(t *testing.T) {
308308 big .NewInt (1 ),
309309 },
310310
311- /* fails
311+ // Low parent baseFee tests
312312 {
313313 params .EIP1559ChainConfig ,
314314 big .NewInt (1000 ),
@@ -319,7 +319,6 @@ func TestCalcBaseFee(t *testing.T) {
319319 8 ,
320320 big .NewInt (2 ),
321321 },
322- */
323322 {
324323 params .EIP1559ChainConfig ,
325324 big .NewInt (1000 ),
@@ -330,29 +329,6 @@ func TestCalcBaseFee(t *testing.T) {
330329 9 ,
331330 big .NewInt (2 ),
332331 },
333- /* fails
334- {
335- params.EIP1559ChainConfig,
336- big.NewInt(1000),
337- 1000,
338- big.NewInt(2000),
339- big.NewInt(1),
340- 100000,
341- 899999,
342- big.NewInt(2),
343- },
344- */
345- {
346- params .EIP1559ChainConfig ,
347- big .NewInt (1000 ),
348- 1000 ,
349- big .NewInt (2000 ),
350- big .NewInt (1 ),
351- 100000 ,
352- 900000 ,
353- big .NewInt (2 ),
354- },
355- /* fails
356332 {
357333 params .EIP1559ChainConfig ,
358334 big .NewInt (1000 ),
@@ -363,7 +339,6 @@ func TestCalcBaseFee(t *testing.T) {
363339 899999999 ,
364340 big .NewInt (2 ),
365341 },
366- */
367342 {
368343 params .EIP1559ChainConfig ,
369344 big .NewInt (1000 ),
@@ -374,7 +349,6 @@ func TestCalcBaseFee(t *testing.T) {
374349 900000000 ,
375350 big .NewInt (2 ),
376351 },
377- /* fails
378352 {
379353 params .EIP1559ChainConfig ,
380354 big .NewInt (1000 ),
@@ -385,7 +359,6 @@ func TestCalcBaseFee(t *testing.T) {
385359 4 ,
386360 big .NewInt (3 ),
387361 },
388- */
389362 {
390363 params .EIP1559ChainConfig ,
391364 big .NewInt (1000 ),
@@ -396,40 +369,16 @@ func TestCalcBaseFee(t *testing.T) {
396369 5 ,
397370 big .NewInt (3 ),
398371 },
399- /* fails
400- {
401- params.EIP1559ChainConfig,
402- big.NewInt(1000),
403- 1000,
404- big.NewInt(2000),
405- big.NewInt(2),
406- 100000,
407- 499999,
408- big.NewInt(3),
409- },
410- */
411372 {
412373 params .EIP1559ChainConfig ,
413374 big .NewInt (1000 ),
414375 1000 ,
415376 big .NewInt (2000 ),
416377 big .NewInt (2 ),
417- 100000 ,
418- 500000 ,
378+ 100000000 ,
379+ 499999999 ,
419380 big .NewInt (3 ),
420381 },
421- /*
422- {
423- params.EIP1559ChainConfig,
424- big.NewInt(1000),
425- 1000,
426- big.NewInt(2000),
427- big.NewInt(2),
428- 100000000,
429- 499999999,
430- big.NewInt(3),
431- },
432- */
433382 {
434383 params .EIP1559ChainConfig ,
435384 big .NewInt (1000 ),
@@ -440,73 +389,6 @@ func TestCalcBaseFee(t *testing.T) {
440389 500000000 ,
441390 big .NewInt (3 ),
442391 },
443-
444- /* fails
445- {
446- params.EIP1559ChainConfig,
447- big.NewInt(1000),
448- 1000,
449- big.NewInt(2000),
450- big.NewInt(3),
451- 1,
452- 3,
453- big.NewInt(4),
454- },
455- */
456- {
457- params .EIP1559ChainConfig ,
458- big .NewInt (1000 ),
459- 1000 ,
460- big .NewInt (2000 ),
461- big .NewInt (3 ),
462- 1 ,
463- 4 ,
464- big .NewInt (4 ),
465- },
466- /* fails
467- {
468- params.EIP1559ChainConfig,
469- big.NewInt(1000),
470- 1000,
471- big.NewInt(2000),
472- big.NewInt(3),
473- 100000,
474- 366666,
475- big.NewInt(4),
476- },
477- */
478- {
479- params .EIP1559ChainConfig ,
480- big .NewInt (1000 ),
481- 1000 ,
482- big .NewInt (2000 ),
483- big .NewInt (3 ),
484- 100000 ,
485- 366667 ,
486- big .NewInt (4 ),
487- },
488- /* fails
489- {
490- params.EIP1559ChainConfig,
491- big.NewInt(1000),
492- 1000,
493- big.NewInt(2000),
494- big.NewInt(3),
495- 100000000,
496- 366666666,
497- big.NewInt(4),
498- },
499- */
500- {
501- params .EIP1559ChainConfig ,
502- big .NewInt (1000 ),
503- 1000 ,
504- big .NewInt (2000 ),
505- big .NewInt (3 ),
506- 100000000 ,
507- 366666667 ,
508- big .NewInt (4 ),
509- },
510392 }
511393 for i , test := range testConditions {
512394 config := * test .config
0 commit comments