As of commit 0e8f70a8, Bitcoin Core's wallet by default discourages fee sniping, when its chain tip is recent, by setting a new transaction's nLockTime to the tip's block height, so only the next block can include it, and in 1 case out of 10 moves the locktime back by a random amount of up to 99 blocks.
Sources and checks
T1Bitcoin Core src/wallet/spend.cpp, DiscourageFeeSnipingSource code, says this directly
tx.nLockTime = block_height;
DiscourageFeeSniping, nLockTime assignment, read 2026-11-26
Still in src/wallet/spend.cpp at the head of bitcoin/bitcoin (0e8f70a863), read 26 Nov 2026.
T1Bitcoin Core src/wallet/spend.cpp, DiscourageFeeSnipingSource code, says this directly
if (rng_fast.randrange(10) == 0 && tx.nLockTime > minimum_height) {
DiscourageFeeSniping, random backdating, read 2026-11-26
Still in src/wallet/spend.cpp at the head of bitcoin/bitcoin (0e8f70a863), read 26 Nov 2026.
T1Bitcoin Core src/wallet/spend.cpp, DiscourageFeeSnipingSource code, says this directly
only the next block can include the transaction, we discourage this
DiscourageFeeSniping, opening comment, read 2026-11-26
Still in src/wallet/spend.cpp at the head of bitcoin/bitcoin (0e8f70a863), read 26 Nov 2026.
T2Bitcoin Optech topic, Fee snipingBitcoin Optech, supports part of it
All wallets that implement anti fee sniping today use nLockTime height locks to prevent a transaction from being included
Anti fee sniping section, read 2026-11-26
bitcoin/bitcoin at 0e8f70a863 contains this text in src/wallet/spend.cpp, and still does on the default branch.
Run it yourself
git clone https://github.com/bitcoin/bitcoin && git -C bitcoin show 0e8f70a86314bc73539b110d947c41d40c4886fc:src/wallet/spend.cpp | grep -nF 'tx.nLockTime = block_height;'bitcoin/bitcoin at 0e8f70a863 contains this text in src/wallet/spend.cpp, and still does on the default branch.
Run it yourself
git clone https://github.com/bitcoin/bitcoin && git -C bitcoin show 0e8f70a86314bc73539b110d947c41d40c4886fc:src/wallet/spend.cpp | grep -nF 'if (rng_fast.randrange(10) == 0 && tx.nLockTime > minimum_height) {'bitcoin/bitcoin at 0e8f70a863 contains this text in src/wallet/spend.cpp.
Run it yourself
git clone https://github.com/bitcoin/bitcoin && git -C bitcoin show 0e8f70a86314bc73539b110d947c41d40c4886fc:src/wallet/spend.cpp | grep -nF 'int range = std::min(100, int(block_height - static_cast<int>(minimum_height) + 1));'Checked at block 977,599, 26 Nov 2026, 00:22 UTC: quotes 4/4, code 3/3
History
Nothing is edited silently; every revision keeps what it replaced.
- 26 Nov 2026, 00:22 UTCblock 977,599
Published Revision 1, run 2026-11-26-daily-proof-of-work