code: func handleGetDifficulty(s *rpcServer, cmd interface{}, closeChan <-chan struct{}) (interface{}, error) {
  	best := s.cfg.Chain.BestSnapshot()
  	return getDifficultyRatio(best.Bits, s.cfg.ChainParams), nil
  }
docs: // handleGetDifficulty implements the getdifficulty command.