code: func New(db walletdb.DB, params chaincfg.Params) (*FilterStore, error) {
  	err := walletdb.Update(db, func(tx walletdb.ReadWriteTx) error {
  		// As part of our initial setup, we'll try to create the top
  		// level filter bucket. If this already exists, then we can
  		// exit early.
  		filters, err := tx.CreateTopLevelBucket(filterBucket)
  		if err != nil {
  			return err
  		}
  
  		// If the main bucket doesn't already exist, then we'll need to
  		// create the sub-buckets, and also initialize them with the
  		// genesis filters.
  		genesisBlock := params.GenesisBlock
  		genesisHash := params.GenesisHash
  
  		// First we'll create the bucket for the regular filters.
  		regFilters, err := filters.CreateBucketIfNotExists(regBucket)
  		if err != nil {
  			return err
  		}
  
  		// With the bucket created, we'll now construct the initial
  		// basic genesis filter and store it within the database.
  		basicFilter, err := builder.BuildBasicFilter(genesisBlock, nil)
  		if err != nil {
  			return err
  		}
  
  		return putFilter(regFilters, genesisHash, basicFilter)
  	})
  	if err != nil && err != walletdb.ErrBucketExists {
  		return nil, err
  	}
  
  	return &FilterStore{
  		db: db,
  	}, nil
  }
docs: // New creates a new instance of the FilterStore given an already open
  // database, and the target chain parameters.