From 3916643ef6dc663f4c0da91efd86e351721bdf7d Mon Sep 17 00:00:00 2001 From: Danny Ryan Date: Mon, 11 Mar 2019 18:23:17 -0600 Subject: [PATCH] only update justified epoch/root if changed --- specs/core/0_beacon-chain.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/specs/core/0_beacon-chain.md b/specs/core/0_beacon-chain.md index 0a86db3f9..47dd765af 100644 --- a/specs/core/0_beacon-chain.md +++ b/specs/core/0_beacon-chain.md @@ -1835,8 +1835,9 @@ def update_justification_and_finalization(state: BeaconState) -> None: # Rotate justified epochs state.previous_justified_epoch = state.justified_epoch state.previous_justified_root = state.justified_root - state.justified_epoch = new_justified_epoch - state.justified_root = get_block_root(state, get_epoch_start_slot(new_justified_epoch)) + if new_justified_epoch != state.justified_epoch: + state.justified_epoch = new_justified_epoch + state.justified_root = get_block_root(state, get_epoch_start_slot(new_justified_epoch)) ``` #### Crosslinks