Issue: The transaction that failed to be included in a block should not cache in mempool

but when timed out waiting for transaction to be included in a block happends, shouldn’t we rollback pushing tx in the mempool and writing WAL?

Most of the clients will want their transaction to be committed (maybe at some later point).

I want to know how this timed-out transaction can be committed later? If client sends a same transaction to commit, it will response “Error on broadcastTxCommit: Tx already exists in cache”. Can we guarantee the timed-out transaction can be committed without any effort of client?