code: func (tx *transaction) HasBlocks(hashes []chainhash.Hash) ([]bool, error) {
  	// Ensure transaction state is valid.
  	if err := tx.checkClosed(); err != nil {
  		return nil, err
  	}
  
  	results := make([]bool, len(hashes))
  	for i := range hashes {
  		results[i] = tx.hasBlock(&hashes[i])
  	}
  
  	return results, nil
  }
docs: // HasBlocks returns whether or not the blocks with the provided hashes
  // exist in the database.
  //
  // Returns the following errors as required by the interface contract:
  //   - ErrTxClosed if the transaction has already been closed
  //
  // This function is part of the database.Tx interface implementation.