def METHOD_NAME(self, tx: BaseTransaction) -> bool:
    key = self._to_key(tx.timestamp, tx.hash)
    is_new = self._db.get((self._cf, key)) is None
    if is_new:
        self._db.put((self._cf, key), b'')
    return is_new