Previously I generated tx with CHECKLOCKTIMEVERIFY Here is the transaction https://tchain.btc.com/bb1415c166fd9f767c06d34d539f4b110ef4445f74a76c5ffad1ded33032e872

It lock funds before block 1442909. I create a new spend transaction.

When I trying to sign it:

bitcoin-cli -testnet signrawtransactionwithwallet "020000000172e83230d3ded1fa5f6ca7745f44f40e114b9f534dd3067c769ffd66c11514bb0000000000ffffffff01443dd200000000002676a92103e8546cfe53ca9014f6a352bc2e5c1f7cec1f5b344c73d4db3ed3b8f075d5c9ef88ac00000000"
  "hex": "020000000172e83230d3ded1fa5f6ca7745f44f40e114b9f534dd3067c769ffd66c11514bb0000000000ffffffff01443dd200000000002676a92103e8546cfe53ca9014f6a352bc2e5c1f7cec1f5b344c73d4db3ed3b8f075d5c9ef88ac00000000",
  "complete": false,
  "errors": [
      "txid": "bb1415c166fd9f767c06d34d539f4b110ef4445f74a76c5ffad1ded33032e872",
      "vout": 0,
      "witness": [
      "scriptSig": "",
      "sequence": 4294967295,
      "error": "Locktime requirement not satisfied"

I got "Locktime requirement not satisfied" ? The height of blockchain now is 1,442,912

What I'm doing wrong?


Bitcoin Core does not support signing scripts with CLTV instructions.

It only supports:

  • P2PK
  • P2PKH
  • k-of-n multisig
  • P2WSH wrapped versions of the above
  • P2WPKH
  • P2SH wrapped versions of the above

If you want to sign anything else, you'll need to implement your own signing logic.

The error you're seeing is due to the spending transaction not having the nLockTime field set. In general, CLTV works indirectly:

  • A CLTV output puts a requirement on the spending transaction to have an nLockTime field larger than the time specified by the CLTV instruction.
  • A transaction with a nLockTime field can only be confirmed when the blockchain time is after the value in that field (this is even the case when no CLTV is present).

But regardless, even if you did have a correct nLockTime field, signrawtransaction would still not know how to sign for that script.

  • 1
    is there a reason for it? To prevent users losing funds or a protection measure for the end-user without detailed knowledge? I was wondering if there may be activities to allow more sophisticated use cases (following s.th. like a "--experimental" switch)? Nov 11 '18 at 9:06
  • No, it's just not implemented. Bitcoin Core has no idea what that script does, or how to construct a satisfying input for it. Nov 11 '18 at 17:03
  • Is there any plan to implement this? Apr 8 '19 at 16:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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