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.


{ "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!!!


1 Answer 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.

  • HCP....Thankyou so much...thats it! As always you have come thru. Appreciate it!
    – krogoth
    Jan 18, 2021 at 15:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.