Skip to content
This repository has been archived by the owner on Jun 11, 2024. It is now read-only.

Add static version of regular merkle root calculation #6885

Closed
Tracked by #6749
shuse2 opened this issue Nov 5, 2021 · 0 comments
Closed
Tracked by #6749

Add static version of regular merkle root calculation #6885

shuse2 opened this issue Nov 5, 2021 · 0 comments
Assignees
Milestone

Comments

@shuse2
Copy link
Collaborator

shuse2 commented Nov 5, 2021

Description

Add below function to the regular merkle tree and expose from index.ts

calculateMerkleRootWithLeafs(leafData: Buffer[]): Buffer

Motivation

Currently regular merkle tree class is used for both one time merkle root calculation and consecutive merkle root calculation. However, this function must be async to support saving the merkle tree data into database.
We want to calculate the merkle root in synchronous function in case of creating transaction root and asset root.

Acceptance criteria

  • Function is unit tested against the fixture
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants