10

Sometimes confirmation process is very slow. I think that is because of the price of the fee. In that time, is it possible to cancel the unconfirmed transaction and re-send with higher transaction fee? Are there any expiry features? E.g. the transaction will be canceled after 7 days?

As far as I read other posts, the answer is NO. If so, do I need to wait for the confirmation forever? For instance, when I set a zero transaction fee accidentally.

Murch
  • 71,155
  • 33
  • 180
  • 600
zono
  • 1,895
  • 1
  • 19
  • 35

2 Answers2

7

In addition to Mark S.'s answer, since Bitcoin Core 0.12 there actually is an expiration in the mempool, which evicts unconfirmed transactions after N hours, where N is set by -mempoolexpiry, and defaults to 72 hours.

This is not a reliable feature, as wallets (and really, anyone) can rebroadcast the transaction, but helps keeping the mempool fresh.

Pieter Wuille
  • 98,249
  • 9
  • 183
  • 287
  • 3
    As far as I can tell, the default value for `-mempoolexpiry` was increased to 336 hours (14 days) in December 2016. – Murch Apr 28 '20 at 18:49
3

The newest version of bitcoin core 0.12 introduced a feature called replace by fee. This can be used to issue a transaction with a higher fee spending coins that have not yet been picked up in a block. This can be used to send funds in a stuck transaction to a new address and the hope is that by including a fee this will get picked up by the miners faster than a transaction with no fees.

Here is a link to the tools used to create this kind of transaction: https://github.com/petertodd/replace-by-fee-tools

As you correctly noted there is no timeframe in which a transaction expires.

Mark S.
  • 2,680
  • 14
  • 23