code: func handleEstimateFee(s *rpcServer, cmd interface{}, closeChan <-chan struct{}) (interface{}, error) {
  	c := cmd.(*btcjson.EstimateFeeCmd)
  
  	if s.cfg.FeeEstimator == nil {
  		return nil, errors.New("Fee estimation disabled")
  	}
  
  	if c.NumBlocks <= 0 {
  		return -1.0, errors.New("Parameter NumBlocks must be positive")
  	}
  
  	feeRate, err := s.cfg.FeeEstimator.EstimateFee(uint32(c.NumBlocks))
  
  	if err != nil {
  		return -1.0, err
  	}
  
  	// Convert to satoshis per kb.
  	return float64(feeRate), nil
  }
docs: // handleEstimateFee handles estimatefee commands.