From 459734cb9eb17da49da515592c7441205d79d5e3 Mon Sep 17 00:00:00 2001 From: vbuterin Date: Thu, 10 Jan 2019 22:34:13 -0600 Subject: [PATCH] get_randao_mix slot boundary fix --- specs/core/0_beacon-chain.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/specs/core/0_beacon-chain.md b/specs/core/0_beacon-chain.md index b399eac16..06a47b052 100644 --- a/specs/core/0_beacon-chain.md +++ b/specs/core/0_beacon-chain.md @@ -966,8 +966,8 @@ def get_randao_mix(state: BeaconState, """ Returns the randao mix at a recent ``slot``. """ - assert state.slot <= slot + LATEST_RANDAO_MIXES_LENGTH - assert slot < state.slot + assert state.slot < slot + LATEST_RANDAO_MIXES_LENGTH + assert slot <= state.slot return state.latest_block_roots[slot % LATEST_RANDAO_MIXES_LENGTH] ```