From 8970b71ca405d3971ca973d5a5f3b6afba7d6964 Mon Sep 17 00:00:00 2001 From: Danny Ryan Date: Sun, 14 Jul 2019 16:05:51 -0600 Subject: [PATCH] ensure min_seed_lookahead functions properly --- specs/core/0_beacon-chain.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specs/core/0_beacon-chain.md b/specs/core/0_beacon-chain.md index ebfe41a6a..49c64e3ed 100644 --- a/specs/core/0_beacon-chain.md +++ b/specs/core/0_beacon-chain.md @@ -865,7 +865,7 @@ def get_seed(state: BeaconState, epoch: Epoch) -> Hash: """ Return the seed at ``epoch``. """ - mix = get_randao_mix(state, Epoch(epoch + EPOCHS_PER_HISTORICAL_VECTOR - MIN_SEED_LOOKAHEAD)) # Avoid underflow + mix = get_randao_mix(state, Epoch(epoch + EPOCHS_PER_HISTORICAL_VECTOR - MIN_SEED_LOOKAHEAD - 1)) # Avoid underflow active_index_root = state.active_index_roots[epoch % EPOCHS_PER_HISTORICAL_VECTOR] return hash(mix + active_index_root + int_to_bytes(epoch, length=32)) ```