<p>OP_CHECKLOCKTIMEVERIFY verifies, as the name implies, the locktime. It does not verify the time.</p>
<p>In other words, it checks the transaction's <code>nLockTime</code> field against the value provided in the opcode. The current block height or time is irrelevant for the opcode directly.</p>
<p>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.</p>

CC BY-SA 4.0
2021-12-05T06:38:43.267Z
Thank you! Do you have a source for an easy-to-understand documentation with concrete examples? I use [this one](https://github.com/BlockchainCommons/Learning-Bitcoin-from-the-Command-Line/blob/master/11_2_Using_CLTV_in_Scripts.md), but it's tricky to understand from my point of view.
zerotobtc
CC BY-SA 4.0
2021-12-04T14:11:44.990Z
2021-12-04T14:11:44.990Z
Pieter Wuille
<p>I try to simply get into the OP_CHECKLOCKTIMEVERIFY opcode and test it. However I get the error</p>
<pre><code>error: Locktime requirement not satisfied
</code></pre>
<p>no matter what unix- or blocktime I enter in my btcdeb. I wanted to check out another debugger, but for example <a href="https://siminchen.github.io/bitcoinIDE/build/editor.html" rel="nofollow noreferrer">the bitcoin IDE</a> does not even know <code>OP_CHECKLOCKTIMEVERIFY</code>...</p>
<p>Can't I just run <code>btcdeb '[&lt;blocksometimeago&gt; OP_CHECKLOCKTIMEVERIFY]'</code>? 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.</p>
<p>THANKS for your help in advance!</p>
<p>Edit: I JUST want to run the verification command, nothing else (no pubkey etc)!</p>

<script><opcodes><checklocktimeverify><debugging>
How to check OP_CHECKLOCKTIMEVERIFY?
zerotobtc
# How to check OP_CHECKLOCKTIMEVERIFY?

(Asked by: username_0 on 2021-12-04)

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 '[ 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)!

**Tags:** script, opcodes, checklocktimeverify, debugging


---

## 1 answers

### Answer by username_1 on 2021-12-04. Score: 6 | Accepted answer

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.

> **Comments:**
> **username_0**: Thank you! Do you have a source for an easy-to-understand documentation with concrete examples? I use [this one](https://github.com/BlockchainCommons/Learning-Bitcoin-from-the-Command-Line/blob/master/11_2_Using_CLTV_in_Scripts.md), but it's tricky to understand from my point of view.  

---

