Fix `get_split_offset` (#790)

This commit is contained in:
NIC Lin 2019-03-16 20:45:39 +08:00 committed by Justin
parent 6b118d2398
commit 1a0938169b
1 changed files with 2 additions and 2 deletions

View File

@ -118,9 +118,9 @@ Phase 1 depends upon all of the constants defined in [Phase 0](0_beacon-chain.md
def get_split_offset(list_size: int, chunks: int, index: int) -> int: def get_split_offset(list_size: int, chunks: int, index: int) -> int:
""" """
Returns a value such that for a list L, chunk count k and index i, Returns a value such that for a list L, chunk count k and index i,
split(L, k)[i] == L[get_split_offset(len(L), k, i): get_split_offset(len(L), k+1, i)] split(L, k)[i] == L[get_split_offset(len(L), k, i): get_split_offset(len(L), k, i+1)]
""" """
return (len(list_size) * index) // chunks return (list_size * index) // chunks
```` ````
#### `get_shuffled_committee` #### `get_shuffled_committee`