Skip to content

Commit 57be3a9

Browse files
committed
clean up
1 parent 86469a2 commit 57be3a9

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

seth/gas_adjuster.go

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -506,7 +506,7 @@ func classifyCongestion(congestionMetric float64) string {
506506
func (m *Client) HistoricalFeeData(priority string) (baseFee float64, historicalGasTipCap float64, err error) {
507507
var percentileTip float64
508508

509-
// based on priority decide, which tip percentile to use, when calling FeeHistory
509+
// based on priority decide, which percentile to use to get historical tip values, when calling FeeHistory
510510
switch priority {
511511
case Priority_Degen:
512512
percentileTip = 100
@@ -525,9 +525,6 @@ func (m *Client) HistoricalFeeData(priority string) (baseFee float64, historical
525525
return
526526
}
527527

528-
// TODO remove me
529-
// percentileTip = 99
530-
531528
estimator := NewGasEstimator(m)
532529
stats, err := estimator.Stats(m.Cfg.Network.GasPriceEstimationBlocks, percentileTip)
533530
if err != nil {
@@ -537,21 +534,16 @@ func (m *Client) HistoricalFeeData(priority string) (baseFee float64, historical
537534
return
538535
}
539536

540-
// base fee should still be based on priority, because FeeHistory returns whole history, not just the requested percentile
541-
// for the base fee (as opposed to tip cap)
537+
// base fee should still be based on priority, because FeeHistory returns whole base fee history, not just the requested percentile
542538
switch priority {
543539
case Priority_Degen:
544540
baseFee = stats.GasPrice.Max
545-
// historicalGasTipCap = stats.TipCap.Max
546541
case Priority_Fast:
547542
baseFee = stats.GasPrice.Perc99
548-
// historicalGasTipCap = stats.TipCap.Perc99
549543
case Priority_Standard:
550544
baseFee = stats.GasPrice.Perc50
551-
// historicalGasTipCap = stats.TipCap.Perc50
552545
case Priority_Slow:
553546
baseFee = stats.GasPrice.Perc25
554-
// historicalGasTipCap = stats.TipCap.Perc25
555547
default:
556548
err = fmt.Errorf("unknown priority: %s", priority)
557549
L.Debug().

0 commit comments

Comments
 (0)