Store.Chain_traversalThe utility module used to traverse the chain.
val path :
chain_store ->
from_block:Block.t ->
to_block:Block.t ->
Block.t list option Lwt.tpath chain_store from_block to_block retrieves all blocks in chain_store from from_block to to_block (from_block is excluded from the result).
val common_ancestor : chain_store -> Block.t -> Block.t -> Block.t option Lwt.tcommon_ancestor chain_store b1 b2 retrieves the common ancestor of b1 and b2 in chain_store. Returns None if no ancestor can be found.
val new_blocks :
chain_store ->
from_block:Block.t ->
to_block:Block.t ->
(Block.t * Block.t list) Lwt.tnew_blocks ~from_block ~to_block returns a pair (ancestor, path), where ancestor is the common ancestor of from_block and to_block and where path is the chain from ancestor (excluded) to to_block (included).