code: func (f *FilterStore) FetchFilter(blockHash *chainhash.Hash,
  	filterType FilterType) (*gcs.Filter, error) {
  
  	var filter *gcs.Filter
  
  	err := walletdb.View(f.db, func(tx walletdb.ReadTx) error {
  		filters := tx.ReadBucket(filterBucket)
  
  		var targetBucket walletdb.ReadBucket
  		switch filterType {
  		case RegularFilter:
  			targetBucket = filters.NestedReadBucket(regBucket)
  		default:
  			return fmt.Errorf("unknown filter type")
  		}
  
  		filterBytes := targetBucket.Get(blockHash[:])
  		if filterBytes == nil {
  			return ErrFilterNotFound
  		}
  		if len(filterBytes) == 0 {
  			return nil
  		}
  
  		dbFilter, err := gcs.FromNBytes(
  			builder.DefaultP, builder.DefaultM, filterBytes,
  		)
  		if err != nil {
  			return err
  		}
  
  		filter = dbFilter
  		return nil
  	})
  	if err != nil {
  		return nil, err
  	}
  
  	return filter, nil
  }
docs: // FetchFilter attempts to fetch a filter with the given hash and type from
  // persistent storage.
  //
  // NOTE: This method is a part of the FilterDatabase interface.