code: func newCostTracker(db ethdb.Database, config *eth.Config) *costTracker {
  	utilTarget := float64(config.LightServ) * flowcontrol.FixedPointMultiplier / 100
  	ct := &costTracker{
  		db:         db,
  		stopCh:     make(chan chan struct{}),
  		utilTarget: utilTarget,
  	}
  	if config.LightBandwidthIn > 0 {
  		ct.inSizeFactor = utilTarget / float64(config.LightBandwidthIn)
  	}
  	if config.LightBandwidthOut > 0 {
  		ct.outSizeFactor = utilTarget / float64(config.LightBandwidthOut)
  	}
  	if makeCostStats {
  		ct.stats = make(map[uint64][]uint64)
  		for code := range reqAvgTimeCost {
  			ct.stats[code] = make([]uint64, 10)
  		}
  	}
  	ct.gfLoop()
  	return ct
  }
docs: // newCostTracker creates a cost tracker and loads the cost factor statistics from the database