mirror of
https://github.com/ChristopherA/Learning-Bitcoin-from-the-Command-Line.git
synced 2025-06-08 00:16:26 +00:00
Update 9_2_Using_CLTV_in_Scripts.md
This commit is contained in:
parent
d39995e424
commit
95ecd5c449
@ -121,11 +121,13 @@ Stack: [ <signature> <pubKey> <NextYear> ]
|
||||
Then, `OP_CHECKLOCKTIMEVERIFY` runs. It finds something on the stack and verifies that `nSequence` isn't 0xffffffff. Finally, it compares `<NextYear>` with `nLockTime`. If they are both the same sort of representation and if `nLockTime ≥ <NextYear>`, then it successfully processes (else, it ends the script):
|
||||
```
|
||||
Script: OP_DROP OP_DUP OP_HASH160 <pubKeyHash> OP_EQUALVERIFY OP_CHECKSIG
|
||||
Running: <NextYear> OP_CHECKLOCKTIMEVERIFY
|
||||
Stack: [ <signature> <pubKey> <NextYear> ]
|
||||
```
|
||||
Then, `OP_DROP` gets rid of that `<NextYear>` left around:
|
||||
```
|
||||
Script: OP_DUP OP_HASH160 <pubKeyHash> OP_EQUALVERIFY OP_CHECKSIG
|
||||
Running: <NextYear> OP_DROP
|
||||
Stack: [ <signature> <pubKey> ]
|
||||
```
|
||||
Finally, the remainder of the script runs, which is a normal check of a signature and public key.
|
||||
|
Loading…
x
Reference in New Issue
Block a user