<p>It's most likely because nLocktime is based on the &quot;mediantime&quot; <em>of the previous block</em>... not &quot;exact&quot; unix time.</p>
<p>Due to delays in finding a new block, it is not unusual for &quot;mediantime&quot; and &quot;current time&quot; to end up out of sync by quite a significant amount (1+ hr).</p>
<p>If you don't have access to a Bitcoin Node to check the <code>getblockchaininfo</code> command, then you can use this online API: <a href="https://chainquery.com/bitcoin-cli/getblockchaininfo" rel="nofollow noreferrer">https://chainquery.com/bitcoin-cli/getblockchaininfo</a></p>
<p>Check the &quot;mediantime&quot; value and compare with your &quot;nLocktime&quot;. Once &quot;mediantime&quot; &gt; &quot;nLocktime&quot;, you should be able to broadcast without error.</p>

CC BY-SA 4.0
2021-01-18T15:10:01.177Z
HCP....Thankyou so much...thats it! As always you have come thru. Appreciate it!
krogoth
CC BY-SA 4.0
2021-01-17T21:54:10.770Z
2021-01-17T21:54:10.770Z
HCP
<p>Created nlocktime with electrum and used the time date feature which is using unix time instead of block height number for the locktime.</p>
<p>SO when pushing the raw tx before its time I get code 26 message non final which is fine as the time in the unix clock has not been reached.</p>
<p>Once the time arrived, I tried again and this time I get  non-final (code 64)  Why? And yes the btc from wallet being sent was confirmed at least with 1 confirmation. Here is the raw tx code. Any help would be appreciated as this is driving me crazy.</p>
<p>020000000156ab1d690e27b9d6dc3764233fa73a9749253472443e7d4efd86c7532eb58a64000000006a47304402205531d1b6808572a77bf649d480cb2f4676ead7035ed39bdb1bb1e928d5441a9102205710edaf122ec991ccab08a6945a1a728d08eecae5dbafb1e72c8481e1672f9d012102cbf41593c5fdb8caaf1942e0c4f2256de0a174c85b2d05252a9053dfc08de65afdffffff01a26900000000000017a91432d423f7e7722ed3ab0c87786e877b5f220148708795980460</p>
<p>{
&quot;txid&quot;: &quot;5b0b8137b86986fe65b2d07346d7dde9cc94ac9cd20671f5161b3bc76012a995&quot;,
&quot;hash&quot;: &quot;5b0b8137b86986fe65b2d07346d7dde9cc94ac9cd20671f5161b3bc76012a995&quot;,
&quot;version&quot;: 2,
&quot;size&quot;: 189,
&quot;vsize&quot;: 189,
&quot;weight&quot;: 756,
&quot;locktime&quot;: 1610914221,
&quot;vin&quot;: [
{
&quot;txid&quot;: &quot;648ab52e53c786fd4e7d3e4472342549973aa73f236437dcd6b9270e691dab56&quot;,
&quot;vout&quot;: 0,
&quot;scriptSig&quot;: {
&quot;asm&quot;: &quot;304402203a3c80d8cb01c28558269fdda6faaa7b1b963030b8867d9c0a933b9813c192c802202770970cdb704416c8fe504a9ed518537e983d2cce534fafa02046aa2181bf7a[ALL] 02cbf41593c5fdb8caaf1942e0c4f2256de0a174c85b2d05252a9053dfc08de65a&quot;,
&quot;hex&quot;: &quot;47304402203a3c80d8cb01c28558269fdda6faaa7b1b963030b8867d9c0a933b9813c192c802202770970cdb704416c8fe504a9ed518537e983d2cce534fafa02046aa2181bf7a012102cbf41593c5fdb8caaf1942e0c4f2256de0a174c85b2d05252a9053dfc08de65a&quot;
},
&quot;sequence&quot;: 4294967293
}
],
&quot;vout&quot;: [
{
&quot;value&quot;: 0.00026092,
&quot;n&quot;: 0,
&quot;scriptPubKey&quot;: {
&quot;asm&quot;: &quot;OP_HASH160 32d423f7e7722ed3ab0c87786e877b5f22014870 OP_EQUAL&quot;,
&quot;hex&quot;: &quot;a91432d423f7e7722ed3ab0c87786e877b5f2201487087&quot;,
&quot;reqSigs&quot;: 1,
&quot;type&quot;: &quot;scripthash&quot;,
&quot;addresses&quot;: [
&quot;36Kmqv4k5cxigNvgV6Geejn7Cvc7MR3oPt&quot;
]
}
}
]
}</p>
<p>It finally broadcast at 443 pm!  BUT WHY DID I HAVE TO WAIT!!!</p>
<pre><code>    https://blockchair.com/bitcoin/transaction/71b27932fa35bc3fbf8343ea81e497b73b11cad7cda87485484a7e52f542c414            
</code></pre>

<blockchain><electrum><raw-transaction>
nLocketime error PUSH TRANSACTION ERROR: 64: NON-FINAL
krogoth
# nLocketime error PUSH TRANSACTION ERROR: 64: NON-FINAL

(Asked by: username_0 on 2021-01-17)

Created nlocktime with electrum and used the time date feature which is using unix time instead of block height number for the locktime.

SO when pushing the raw tx before its time I get code 26 message non final which is fine as the time in the unix clock has not been reached.

Once the time arrived, I tried again and this time I get non-final (code 64) Why? And yes the btc from wallet being sent was confirmed at least with 1 confirmation. Here is the raw tx code. Any help would be appreciated as this is driving me crazy.

020000000156ab1d690e27b9d6dc3764233fa73a9749253472443e7d4efd86c7532eb58a64000000006a47304402205531d1b6808572a77bf649d480cb2f4676ead7035ed39bdb1bb1e928d5441a9102205710edaf122ec991ccab08a6945a1a728d08eecae5dbafb1e72c8481e1672f9d012102cbf41593c5fdb8caaf1942e0c4f2256de0a174c85b2d05252a9053dfc08de65afdffffff01a26900000000000017a91432d423f7e7722ed3ab0c87786e877b5f220148708795980460

{
"txid": "5b0b8137b86986fe65b2d07346d7dde9cc94ac9cd20671f5161b3bc76012a995",
"hash": "5b0b8137b86986fe65b2d07346d7dde9cc94ac9cd20671f5161b3bc76012a995",
"version": 2,
"size": 189,
"vsize": 189,
"weight": 756,
"locktime": 1610914221,
"vin": [
{
"txid": "648ab52e53c786fd4e7d3e4472342549973aa73f236437dcd6b9270e691dab56",
"vout": 0,
"scriptSig": {
"asm": "304402203a3c80d8cb01c28558269fdda6faaa7b1b963030b8867d9c0a933b9813c192c802202770970cdb704416c8fe504a9ed518537e983d2cce534fafa02046aa2181bf7a[ALL] 02cbf41593c5fdb8caaf1942e0c4f2256de0a174c85b2d05252a9053dfc08de65a",
"hex": "47304402203a3c80d8cb01c28558269fdda6faaa7b1b963030b8867d9c0a933b9813c192c802202770970cdb704416c8fe504a9ed518537e983d2cce534fafa02046aa2181bf7a012102cbf41593c5fdb8caaf1942e0c4f2256de0a174c85b2d05252a9053dfc08de65a"
},
"sequence": 4294967293
}
],
"vout": [
{
"value": 0.00026092,
"n": 0,
"scriptPubKey": {
"asm": "OP\_HASH160 32d423f7e7722ed3ab0c87786e877b5f22014870 OP\_EQUAL",
"hex": "a91432d423f7e7722ed3ab0c87786e877b5f2201487087",
"reqSigs": 1,
"type": "scripthash",
"addresses": [
"36Kmqv4k5cxigNvgV6Geejn7Cvc7MR3oPt"
]
}
}
]
}

It finally broadcast at 443 pm! BUT WHY DID I HAVE TO WAIT!!!

```
    https://blockchair.com/bitcoin/transaction/71b27932fa35bc3fbf8343ea81e497b73b11cad7cda87485484a7e52f542c414            

```

**Tags:** blockchain, electrum, raw-transaction


---

## 1 answers

### Answer by username_1 on 2021-01-17. Score: 1

It's most likely because nLocktime is based on the "mediantime" *of the previous block*... not "exact" unix time.

Due to delays in finding a new block, it is not unusual for "mediantime" and "current time" to end up out of sync by quite a significant amount (1+ hr).

If you don't have access to a Bitcoin Node to check the `getblockchaininfo` command, then you can use this online API: <https://chainquery.com/bitcoin-cli/getblockchaininfo>

Check the "mediantime" value and compare with your "nLocktime". Once "mediantime" > "nLocktime", you should be able to broadcast without error.

> **Comments:**
> **username_0**: HCP....Thankyou so much...thats it! As always you have come thru. Appreciate it!  

---

