mirror of
https://github.com/ethereum/consensus-specs.git
synced 2026-02-02 04:45:01 -05:00
Apply HWW code's review - fix is_before_attesting_interval
This commit is contained in:
@@ -176,7 +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_attesting_interval = store.time % SECONDS_PER_SLOT < SECONDS_PER_SLOT // INTERVALS_PER_SLOT
|
||||
time_into_slot = (store.time - store.genesis_time) % SECONDS_PER_SLOT
|
||||
is_before_attesting_interval = time_into_slot < SECONDS_PER_SLOT // INTERVALS_PER_SLOT
|
||||
if get_current_slot(store) == block.slot and is_before_attesting_interval:
|
||||
store.proposer_boost_root = hash_tree_root(block)
|
||||
|
||||
|
||||
@@ -414,7 +414,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_attesting_interval = store.time % SECONDS_PER_SLOT < SECONDS_PER_SLOT // INTERVALS_PER_SLOT
|
||||
time_into_slot = (store.time - store.genesis_time) % SECONDS_PER_SLOT
|
||||
is_before_attesting_interval = time_into_slot < SECONDS_PER_SLOT // INTERVALS_PER_SLOT
|
||||
if get_current_slot(store) == block.slot and is_before_attesting_interval:
|
||||
store.proposer_boost_root = hash_tree_root(block)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user