package tezos-shell

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

Index of operations (for the mempool).

include Tezos_requester.Requester.REQUESTER with type t := chain_db and type key := Tezos_crypto.Operation_hash.t and type value := Tezos_base.Operation.t and type param := unit

know t k returns true iff the key is present in the memory table or the disk.

type Tezos_base__TzPervasives.error +=
  1. | Missing_data of Tezos_crypto.Operation_hash.t
type Tezos_base__TzPervasives.error +=
  1. | Canceled of Tezos_crypto.Operation_hash.t
type Tezos_base__TzPervasives.error +=
  1. | Timeout of Tezos_crypto.Operation_hash.t

Return value if it is found in-memory, or else on disk. Otherwise fail with error Missing_data.

Same as read but returns None if not found.

fetch t ?peer ?timeout k param returns the value when it is known. It can fail with Timeout k if timeout is provided and the value isn't know before the timeout expires. It can fail with Cancel if the request is canceled.

The key is first looked up in memory, then on disk. If not present and not already requested, it schedules a request, and blocks until the requester is notified with notify. param is used to validate the notified value once it is received. (see also PRECHECK and notify).

Requests are re-sent via a 1.5 exponential back-off, with initial delay set to Request.initial_delay. If the function is called multiple time with the same key but with distinct peers, the internal scheduler randomly chooses the requested peer (at each retry).

val clear_or_cancel : chain_db -> Tezos_crypto.Operation_hash.t -> unit

Remove the data from the memory table if present. Otherwise cancel all pending requests. Any pending fetch promises are resolved with the error Canceled.

OCaml

Innovation. Community. Security.