From 24947be7c3446c142aa767fdbbb57b412a008b86 Mon Sep 17 00:00:00 2001 From: Paul Hauner Date: Tue, 18 Jan 2022 12:29:20 +1100 Subject: [PATCH] Rename should_optimistically_import... --- sync/optimistic.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sync/optimistic.md b/sync/optimistic.md index a66408b93e..257574a62f 100644 --- a/sync/optimistic.md +++ b/sync/optimistic.md @@ -71,7 +71,7 @@ def is_execution_block(block: BeaconBlock) -> BeaconBlock: ``` ```python -def should_optimistically_import_block(opt_store: OptimisticStore, current_slot: Slot, block: BeaconBlock) -> bool: +def is_optimistic_candidate_block(opt_store: OptimisticStore, current_slot: Slot, block: BeaconBlock) -> bool: justified_root = opt_store.block_states[opt_store.head_block_root].current_justified_checkpoint.root justifed_is_verified = is_execution_block(opt_store.blocks[justified_root]) block_is_deep = block.slot + SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY <= current_slot @@ -90,7 +90,7 @@ behaviours without regard for optimistic sync. ### When to optimistically import blocks A block MAY be optimistically imported when -`should_optimistically_import_block(opt_store, current_slot, block)` returns +`is_optimistic_candidate_block(opt_store, current_slot, block)` returns `True`. This ensures that blocks are only optimistically imported if either: 1. The justified checkpoint has execution enabled.