Function darkfi::runtime::import::smt::sparse_merkle_insert_batch

source ยท
pub(crate) fn sparse_merkle_insert_batch(
    ctx: FunctionEnvMut<'_, Env>,
    ptr: WasmPtr<u8>,
    len: u32,
) -> i64
Expand description

Adds data to sparse merkle tree. The tree, database connection, and new data to add is read from ptr at offset specified by len. Returns 0 on success; otherwise, returns an error-code corresponding to a ContractError (defined in the SDK). See also the method merkle_add in sdk/src/merkle.rs.

Permissions: update