only update justified epoch/root if changed
This commit is contained in:
parent
f06a3b82e7
commit
3916643ef6
|
@ -1835,6 +1835,7 @@ 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
|
||||
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))
|
||||
```
|
||||
|
|
Loading…
Reference in New Issue