From 8040044f6925bb915e3eb50765ed8010c679be8a Mon Sep 17 00:00:00 2001 From: Danny Ryan Date: Wed, 30 Jan 2019 06:46:43 -0800 Subject: [PATCH] fix is_surround as per #410 (#523) --- specs/core/0_beacon-chain.md | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/specs/core/0_beacon-chain.md b/specs/core/0_beacon-chain.md index 6c74ef0b9..e4b2d498a 100644 --- a/specs/core/0_beacon-chain.md +++ b/specs/core/0_beacon-chain.md @@ -1095,11 +1095,8 @@ def is_surround_vote(attestation_data_1: AttestationData, source_epoch_2 = attestation_data_2.justified_epoch target_epoch_1 = slot_to_epoch(attestation_data_1.slot) target_epoch_2 = slot_to_epoch(attestation_data_2.slot) - return ( - (source_epoch_1 < source_epoch_2) and - (source_epoch_2 + 1 == target_epoch_2) and - (target_epoch_2 < target_epoch_1) - ) + + return source_epoch_1 < source_epoch_2 and target_epoch_2 < target_epoch_1 ``` ### `integer_squareroot`