1
0
mirror of https://github.com/bitcoinbook/bitcoinbook synced 2024-12-23 15:18:11 +00:00

Edited ch07.asciidoc with Atlas code editor

This commit is contained in:
judymcconville@roadrunner.com 2017-05-01 12:19:27 -07:00
parent 75f8a6eeee
commit 0aa5e51b6b

View File

@ -316,7 +316,7 @@ BIP-68 and BIP-112 were activated in May 2016 as a soft-fork upgrade to the cons
==== Relative Timelock with nSequence
Relative timelocks can be set on each input of a transaction, by setting the +nSequence+ field in each input.
((("nSequence field")))((("scripting", "timeclocks", "relative timeclocks with nSequence")))Relative timelocks can be set on each input of a transaction, by setting the +nSequence+ field in each input.
===== Original meaning of nSequence
@ -347,7 +347,7 @@ The standard is defined in https://github.com/bitcoin/bips/blob/master/bip-0068.
==== Relative Timelocks with CHECKSEQUENCEVERIFY (CSV)
Just like CLTV and +nLocktime+, there is a script opcode for relative timelocks that leverages the +nSequence+ value in scripts. That opcode is +CHECKSEQUENCEVERIFY+, commonly referred to as +CSV+ for short.
((("scripting", "timelocks", "relative timeclocks with CHECKSEQUENCEVERIFY")))((("CHECKSEQUENCEVERIFY (CSV)")))Just like CLTV and +nLocktime+, there is a script opcode for relative timelocks that leverages the +nSequence+ value in scripts. That opcode is +CHECKSEQUENCEVERIFY+, commonly referred to as +CSV+ for short.
The +CSV+ opcode when evaluated in a UTXO's redeem script, allows spending only in a transaction whose input +nSequence+ value is greater than or equal to the +CSV+ parameter. Essentially, this restricts spending the UTXO until a certain number of blocks or seconds have elapsed relative to the time the UTXO was mined.