nLockTime in Bitcoin Transactions Explained

5 replies 480 views
bear_bitNewbie
Posts: 5 · Reputation: 33
#1Jul 6, 2020, 08:52 PM
I’m digging in the Bitcoin world and I have some questions about nLockTime and RBF. So, I think nLockTime is kinda like a timer for transactions, right? Miners can’t confirm them until the time hits? And RBF lets you swap an unconfirmed transaction for a new one with a higher fee. I’m good with that but I still got two questions: 1. Can you replace a transaction with nLockTime?
3 Reply Quote Share
d4n.b0ssFull Member
Posts: 39 · Reputation: 386
#2Jul 7, 2020, 12:09 AM
Sure thing, you can replace it! Like, if I set an nLockTime and then realize my expectations aren’t met when the time arrives, I can just create a new one with a new time. It’s also handy for gifting if the recipient isn’t who I thought by the lock time, I can switch it up and set a new time.
4 Reply Quote Share
0xChadNewbie
Posts: 513 · Reputation: 3
#3Jul 7, 2020, 02:14 AM
RBF and nLockTime? Not really related. A transaction with nLockTime just sits there until its time is up. Nodes won’t even relay it. So if it’s not broadcast, you can’t replace it. RBF is meant for transactions already out there, trying to get them confirmed faster.
2 Reply Quote Share
chrisomegaFull Member
Posts: 158 · Reputation: 631
#4Jul 9, 2020, 08:32 AM
Exactly! A future locktime transaction won’t even hit the mempool, so no broadcasting until the specified time. You literally just wait it out until you can send it out. It’s locked up until then.
3 Reply Quote Share
m1kes4tFull Member
Posts: 167 · Reputation: 252
#5Jul 9, 2020, 01:31 PM
Think of it like this having nLockTime set for the future is like writing a check that’s postdated for a month. You’re not sending it to the bank until the date hits. If you try to cash it in early, the bank will just say no. Gotta wait for that date!
1 Reply Quote Share
bear_bitNewbie
Posts: 5 · Reputation: 33
#6Jul 9, 2020, 05:28 PM
Got it now, thanks everyone. I thought the transactions were stored in the nodes’ mempool until the time came, but now I see it can’t be broadcast at all. It either stays in my wallet or I just chill until the time’s up. Appreciate the help!
2 Reply Quote Share

Related topics