From 1a0938169bce4388c4443809a221862a259d9b69 Mon Sep 17 00:00:00 2001 From: NIC Lin Date: Sat, 16 Mar 2019 20:45:39 +0800 Subject: [PATCH] Fix `get_split_offset` (#790) --- specs/core/1_shard-data-chains.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/specs/core/1_shard-data-chains.md b/specs/core/1_shard-data-chains.md index 1713c6cbf..b2f567ed8 100644 --- a/specs/core/1_shard-data-chains.md +++ b/specs/core/1_shard-data-chains.md @@ -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: """ 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`