Function darkfi_sdk::merkle::merkle_add

source ·
pub fn merkle_add(
    db_info: DbHandle,
    db_roots: DbHandle,
    key: &[u8],
    elements: &[MerkleNode]
) -> GenericResult<()>
Expand description

Add given elements into a Merkle tree.

  • db_info is a handle for a database where the Merkle tree is stored.
  • db_roots is a handle for a database where all the new Merkle roots are stored.
  • key is the serialized key for db_info.
  • elements are the items we want to add to the Merkle tree.