mirror of
https://github.com/bitcoin/bips.git
synced 2026-06-01 17:15:27 +00:00
BIP68: fix wrong upper bound for nHeight
This commit is contained in:
@@ -240,7 +240,7 @@ Additionally, this BIP specifies only 16 bits to actually encode relative lock-t
|
|||||||
The most efficient way to calculate sequence number from relative lock-time is with bit masks and shifts:
|
The most efficient way to calculate sequence number from relative lock-time is with bit masks and shifts:
|
||||||
|
|
||||||
<pre>
|
<pre>
|
||||||
// 0 <= nHeight < 65,535 blocks (1.25 years)
|
// 0 <= nHeight <= 65,535 blocks (1.25 years)
|
||||||
nSequence = nHeight;
|
nSequence = nHeight;
|
||||||
nHeight = nSequence & 0x0000ffff;
|
nHeight = nSequence & 0x0000ffff;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user