Skip to content

Added reconstruct#3

Open
skilesare wants to merge 1 commit intonomeata:mainfrom
skilesare:patch-1
Open

Added reconstruct#3
skilesare wants to merge 1 commit intonomeata:mainfrom
skilesare:patch-1

Conversation

@skilesare
Copy link
Copy Markdown

Added reconstruct to allow proving a previous treeHash() equals a Witness Hash.

Added reconstruct to allow proving a previous treeHash() equals a Witness Hash.
Copy link
Copy Markdown
Owner

@nomeata nomeata left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I think this deserves some tests, ideally randomized tests.

Comment thread src/MerkleTree.mo
};

/// reconstructs a hash from a witness. This should match the value produced by treeHash
public func reconstruct(w: Witness) : Blob {
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
public func reconstruct(w: Witness) : Blob {
public func reconstruct(w: Witness) : Hash {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants