code: func (sp *serverPeer) OnGetCFilters(_ *peer.Peer, msg *wire.MsgGetCFilters) {
  	// Ignore getcfilters requests if not in sync.
  	if !sp.server.syncManager.IsCurrent() {
  		return
  	}
  
  	// We'll also ensure that the remote party is requesting a set of
  	// filters that we actually currently maintain.
  	switch msg.FilterType {
  	case wire.GCSFilterRegular:
  		break
  
  	default:
  		peerLog.Debug("Filter request for unknown filter: %v",
  			msg.FilterType)
  		return
  	}
  
  	hashes, err := sp.server.chain.HeightToHashRange(
  		int32(msg.StartHeight), &msg.StopHash, wire.MaxGetCFiltersReqRange,
  	)
  	if err != nil {
  		peerLog.Debugf("Invalid getcfilters request: %v", err)
  		return
  	}
  
  	// Create []*chainhash.Hash from []chainhash.Hash to pass to
  	// FiltersByBlockHashes.
  	hashPtrs := make([]*chainhash.Hash, len(hashes))
  	for i := range hashes {
  		hashPtrs[i] = &hashes[i]
  	}
  
  	filters, err := sp.server.cfIndex.FiltersByBlockHashes(
  		hashPtrs, msg.FilterType,
  	)
  	if err != nil {
  		peerLog.Errorf("Error retrieving cfilters: %v", err)
  		return
  	}
  
  	for i, filterBytes := range filters {
  		if len(filterBytes) == 0 {
  			peerLog.Warnf("Could not obtain cfilter for %v",
  				hashes[i])
  			return
  		}
  
  		filterMsg := wire.NewMsgCFilter(
  			msg.FilterType, &hashes[i], filterBytes,
  		)
  		sp.QueueMessage(filterMsg, nil)
  	}
  }
docs: // OnGetCFilters is invoked when a peer receives a getcfilters bitcoin message.