2

I try to simply get into the OP_CHECKLOCKTIMEVERIFY opcode and test it. However I get the error

error: Locktime requirement not satisfied

no matter what unix- or blocktime I enter in my btcdeb. I wanted to check out another debugger, but for example the bitcoin IDE does not even know OP_CHECKLOCKTIMEVERIFY...

Can't I just run btcdeb '[<blocksometimeago> OP_CHECKLOCKTIMEVERIFY]'? I mean I know the the error should appear as long as the block- or unixtime isn't reached yet but even if I enter a block from years ago, I get the same error.

THANKS for your help in advance!

Edit: I JUST want to run the verification command, nothing else (no pubkey etc)!

1 Answer 1

3

OP_CHECKLOCKTIMEVERIFY verifies, as the name implies, the locktime. It does not verify the time.

In other words, it checks the transaction's nLockTime field against the value provided in the opcode. The current block height or time is irrelevant for the opcode directly.

Of course, the net effect of this opcode is restricting when the transaction can be mined. It does that through a 2-step restriction: the opcode restricts the possible values of the nLockTime field, and the nLockTime field on its turn restricts when the transaction can be mined.

1
  • Thank you! Do you have a source for an easy-to-understand documentation with concrete examples? I use this one, but it's tricky to understand from my point of view.
    – zerotobtc
    Dec 5, 2021 at 6:38

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.