Skip to content

Commit 1a33bf8

Browse files
authored
Merge pull request #3608 from ethereum/mkalinin-patch-6
Introduce UINT64_MAX_SQRT
2 parents cdb6725 + 3e26508 commit 1a33bf8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

specs/phase0/beacon-chain.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,7 @@ The following values are (non-configurable) constants used throughout the specif
179179
| Name | Value |
180180
| - | - |
181181
| `UINT64_MAX` | `uint64(2**64 - 1)` |
182+
| `UINT64_MAX_SQRT` | `uint64(4294967295)` |
182183
| `GENESIS_SLOT` | `Slot(0)` |
183184
| `GENESIS_EPOCH` | `Epoch(0)` |
184185
| `FAR_FUTURE_EPOCH` | `Epoch(2**64 - 1)` |
@@ -601,7 +602,7 @@ def integer_squareroot(n: uint64) -> uint64:
601602
Return the largest integer ``x`` such that ``x**2 <= n``.
602603
"""
603604
if n == UINT64_MAX:
604-
return uint64(4294967295)
605+
return UINT64_MAX_SQRT
605606
x = n
606607
y = (x + 1) // 2
607608
while y < x:

0 commit comments

Comments
 (0)