From 104b83aab3086daeb6afe724bc2d9c0f1e5f00c9 Mon Sep 17 00:00:00 2001 From: ericsson Date: Tue, 22 Sep 2020 18:54:44 +0300 Subject: [PATCH] use integer division (//) instead of non-integer (/) --- specs/phase0/weak-subjectivity.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/specs/phase0/weak-subjectivity.md b/specs/phase0/weak-subjectivity.md index 07c3083a3..7417053f5 100644 --- a/specs/phase0/weak-subjectivity.md +++ b/specs/phase0/weak-subjectivity.md @@ -69,9 +69,9 @@ def compute_weak_subjectivity_period(state: BeaconState) -> uint64: weak_subjectivity_period = MIN_VALIDATOR_WITHDRAWABILITY_DELAY validator_count = len(get_active_validator_indices(state, get_current_epoch(state))) if validator_count >= MIN_PER_EPOCH_CHURN_LIMIT * CHURN_LIMIT_QUOTIENT: - weak_subjectivity_period += SAFETY_DECAY * CHURN_LIMIT_QUOTIENT / (2 * 100) + weak_subjectivity_period += SAFETY_DECAY * CHURN_LIMIT_QUOTIENT // (2 * 100) else: - weak_subjectivity_period += SAFETY_DECAY * validator_count / (2 * 100 * MIN_PER_EPOCH_CHURN_LIMIT) + weak_subjectivity_period += SAFETY_DECAY * validator_count // (2 * 100 * MIN_PER_EPOCH_CHURN_LIMIT) return weak_subjectivity_period ```