From 3a6a565a8fad477534f9f2120bac878820485769 Mon Sep 17 00:00:00 2001 From: Mikhail Kalinin Date: Tue, 8 Jun 2021 15:03:59 +0600 Subject: [PATCH] Replace fractional division with integer one Co-authored-by: vbuterin --- specs/merge/fork.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/specs/merge/fork.md b/specs/merge/fork.md index 0d0a81a33..141b05faa 100644 --- a/specs/merge/fork.md +++ b/specs/merge/fork.md @@ -102,8 +102,8 @@ Transition store initialization occurs after the state has been modified by corr ```python def compute_transition_total_difficulty(anchor_pow_block: PowBlock) -> uint256: seconds_per_voting_period = EPOCHS_PER_ETH1_VOTING_PERIOD * SLOTS_PER_EPOCH * SECONDS_PER_SLOT - pow_blocks_per_voting_period = seconds_per_voting_period / SECONDS_PER_ETH1_BLOCK - pow_blocks_since_merge_fork = SECONDS_SINCE_MERGE_FORK / SECONDS_PER_ETH1_BLOCK + pow_blocks_per_voting_period = seconds_per_voting_period // SECONDS_PER_ETH1_BLOCK + pow_blocks_since_merge_fork = SECONDS_SINCE_MERGE_FORK // SECONDS_PER_ETH1_BLOCK pow_blocks_to_transition = ETH1_FOLLOW_DISTANCE + pow_blocks_per_voting_period + pow_blocks_since_merge_fork anchor_difficulty = max(MIN_ANCHOR_POW_BLOCK_DIFFICULTY, anchor_pow_block.difficulty)