[][src]Function tendermint_light_client::components::scheduler::basic_bisecting_schedule

pub fn basic_bisecting_schedule(
    light_store: &dyn LightStore,
    current_height: Height,
    target_height: Height
) -> Height

Basic bisecting scheduler which picks the appropriate midpoint without optimizing for performance using the blocks available in the light store.

Precondition

  • The light store contains at least one verified block. [LCV-SCHEDULE-PRE.1]

Postcondition

  • The resulting height must be valid according to valid_schedule. [LCV-SCHEDULE-POST.1]

Contracts

Pre-condition: light_store . latest_trusted_or_verified() . is_some()

Post-condition: valid_schedule(ret, target_height, current_height, light_store)