1
0
mirror of https://github.com/bitcoinbook/bitcoinbook synced 2025-01-11 00:01:03 +00:00

Edited ch07.asciidoc with Atlas code editor

This commit is contained in:
nadams 2017-04-24 13:34:41 -07:00
parent aee54b2088
commit d908614787

View File

@ -332,7 +332,7 @@ Transaction inputs with +nSequence+ values less than 2^31^ are interpreted as ha
The +nSequence+ value is specified in either blocks or seconds, but in a slightly different format than we saw used in +nLocktime+. A type-flag is used to differentiate between values counting blocks and values counting time in seconds. The type-flag is set in the 23rd least significant bit (i.e., value 1<<22). If the type-flag is set, then the +nSequence+ value is interpreted as a multiple of 512 seconds. If the type-flag is not set, the +nSequence+ value is interpreted as a number of blocks.
When interpreting +nSequence+ as a relative timelock, only the 16 least significant bits are considered. Once the flags (bits 32 and 23) are evaluated, the +nSequence+ value is usually "masked" with a 16-bit mask (eg. +nSequence+ & 0x0000FFFF).
When interpreting +nSequence+ as a relative timelock, only the 16 least significant bits are considered. Once the flags (bits 32 and 23) are evaluated, the +nSequence+ value is usually "masked" with a 16-bit mask (e.g., +nSequence+ & 0x0000FFFF).
<<bip_68_def_of_nseq>> shows the binary layout of the +nSequence+ value, as defined by BIP-68.