[][src]Function tendermint::lite::verifier::verify_and_update_bisection

pub fn verify_and_update_bisection<TS, SH, C, L, R, S>(
    untrusted_height: Height,
    trust_threshold: &L,
    trusting_period: &Duration,
    now: &SystemTime,
    req: &R,
    store: &mut S
) -> Result<(), Error> where
    TS: TrustedState<LastHeader = SH, ValidatorSet = C::ValidatorSet>,
    SH: SignedHeader<Commit = C>,
    C: Commit,
    L: TrustThreshold,
    R: Requester<SignedHeader = SH, ValidatorSet = C::ValidatorSet>,
    S: Store<TrustedState = TS>, 

Attempt to update the store to the given untrusted height by requesting the necessary data (signed headers and validators). Returns an error if: - we're already at or past that height - our latest state expired - any requests fail - requested data is inconsistent (eg. vals don't match hashes in header) - validators did not correctly commit their blocks This function is recursive: it uses a bisection algorithm to request data for intermediate heights as necessary. Ensures our last trusted header hasn't expired yet, and that data from the untrusted height can be verified, possibly using data from intermediate heights. This function is primarily for use by a light node.