From 36e26c86a37734b73a0fe503ac8f1d0acc9b9515 Mon Sep 17 00:00:00 2001 From: Danny Ryan Date: Tue, 18 Dec 2018 12:53:48 -0600 Subject: [PATCH] fix assert conditions in get_block_hash --- specs/core/0_beacon-chain.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/specs/core/0_beacon-chain.md b/specs/core/0_beacon-chain.md index d934ccc98..fa6ae338b 100644 --- a/specs/core/0_beacon-chain.md +++ b/specs/core/0_beacon-chain.md @@ -902,7 +902,8 @@ def get_block_root(state: BeaconState, """ Returns the block root at a recent ``slot``. """ - assert slot > state.slot - LATEST_BLOCK_ROOTS_LENGTH + assert state.slot <= slot + LATEST_BLOCK_ROOTS_LENGTH + assert slot < state.slot return state.latest_block_roots[slot % LATEST_BLOCK_ROOTS_LENGTH] ```