Issue Details
- Number
- 26527
- Title
- wallet: don't back-date locktime when spending unconfirmed UTXOs
- Description
- As mentioned in https://github.com/bitcoin/bitcoin/pull/26451#issuecomment-1313934927 example 3:
If we do anti-fee sniping, the Bitcoin Core wallet has a 10% chance to back-date the locktime of a transaction to up to 100 blocks. Electrum has similar behavior.
https://github.com/bitcoin/bitcoin/blob/48174c0f287b19931ca110670610bd03a03eb914/src/wallet/spend.cpp#L725-L731
When spending an unconfirmed UTXO, it can happen that we back-date the locktime of our transaction to a locktime before the locktime of the unconfirmed parent. In this case, the "transaction signed earlier but only broadcast now" is unrealistic I think (please correct me if you think there is a protocol where this makes sense). This is a fingerprint that we are a Bitcoin Core or Electrum wallet.
related https://github.com/bitcoin/bitcoin/issues/26526
electrum issue: https://github.com/spesmilo/electrum/issues/8073
- URL
-
https://github.com/bitcoin/bitcoin/issue/26527
- Closed by
-
Back to List