This reverts commit 4c726cdff39a10c5d096b294fb562cfc99c1f068.

This commit is contained in:
Aditya Asgaonkar
2021-11-22 08:48:40 -08:00
committed by Danny Ryan
parent 3b20e3ea02
commit 859bbf4358
2 changed files with 3 additions and 3 deletions

View File

@@ -176,8 +176,8 @@ def on_block(store: Store, signed_block: SignedBeaconBlock) -> None:
store.block_states[hash_tree_root(block)] = state
# Add proposer score boost if the block is timely
is_before_attestation_broadcast = store.time % SECONDS_PER_SLOT < SECONDS_PER_SLOT // ATTESTATION_OFFSET_QUOTIENT
if get_current_slot(store) == block.slot and is_before_attestation_broadcast:
if (get_current_slot(store) == block.slot and
store.time % SECONDS_PER_SLOT < SECONDS_PER_SLOT // ATTESTATION_OFFSET_QUOTIENT):
store.proposer_score_boost = LatestMessage(
root=hash_tree_root(block),
epoch=compute_epoch_at_slot(block.slot)

View File

@@ -114,7 +114,7 @@ def get_forkchoice_store(anchor_state: BeaconState, anchor_block: BeaconBlock) -
anchor_epoch = get_current_epoch(anchor_state)
justified_checkpoint = Checkpoint(epoch=anchor_epoch, root=anchor_root)
finalized_checkpoint = Checkpoint(epoch=anchor_epoch, root=anchor_root)
proposer_score_boost = LatestMessage(root=Root(), epoch=Epoch())
proposer_score_boost = LatestMessage(root=Root(), epoch=Epoch(0))
return Store(
time=uint64(anchor_state.genesis_time + SECONDS_PER_SLOT * anchor_state.slot),
genesis_time=anchor_state.genesis_time,