Update 11_2_Using_CLTV_in_Scripts.md

OP_CHECKLOCKTIMEVERIFY not OP_CHECKLOCKTIMEVALUE
This commit is contained in:
Sebastian Kaeser 2022-11-17 10:52:39 +01:00 committed by GitHub
parent bea17662dd
commit 8a2a6955ff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -51,7 +51,7 @@ But we'll usually abtract it like this:
The above explanation is sufficient to use and understand CLTV. However, [BIP 65](https://github.com/bitcoin/bips/blob/master/bip-0065.mediawiki) lays out all the details. The above explanation is sufficient to use and understand CLTV. However, [BIP 65](https://github.com/bitcoin/bips/blob/master/bip-0065.mediawiki) lays out all the details.
A locking script will only allow a transaction to respend a UTXO locked with a CLTV if `OP_CHECKLOCKTIMEVALUE` verifies all of the following: A locking script will only allow a transaction to respend a UTXO locked with a CLTV if `OP_CHECKLOCKTIMEVERIFY` verifies all of the following:
* The `nSequence` field must be set to less than 0xffffffff, usually 0xffffffff-1 to avoid confilcts with relative timelocks. * The `nSequence` field must be set to less than 0xffffffff, usually 0xffffffff-1 to avoid confilcts with relative timelocks.
* CLTV must pop an operand off the stack and it must be 0 or greater. * CLTV must pop an operand off the stack and it must be 0 or greater.