package tezos-legacy-store

  1. Overview
  2. Docs

Tezos Shell Module - Managing the current head.

The genesis block of the chain. On a test chain, the test protocol has been promoted as "main" protocol.

The current head of the chain.

type data = {
  1. current_head : Legacy_state.Block.t;
  2. current_mempool : Tezos_base.Mempool.t;
  3. live_blocks : Tezos_crypto.Block_hash.Set.t;
  4. live_operations : Tezos_crypto.Operation_hash.Set.t;
  5. test_chain : Tezos_crypto.Chain_id.t option;
  6. save_point : Int32.t * Tezos_crypto.Block_hash.t;
  7. caboose : Int32.t * Tezos_crypto.Block_hash.t;
}

All the available chain data.

Reading atomically all the chain data.

The current head and all the known (valid) alternate heads.

Test whether a block belongs to the current mainchain.

Record a block as the current head of the chain. It returns the previous head.

Atomically change the current head of the chain. This returns true whenever the change succeeded, or false when the current head is not equal to the old argument.

Restores the data about the current head at startup (recomputes the sets of live blocks and operations).