From f60ed66351cd294888430df46ed09c4c2919d597 Mon Sep 17 00:00:00 2001 From: daniel Date: Fri, 21 Oct 2022 13:52:39 +0300 Subject: [PATCH] Update README.md fix example of bad proof --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index ab8c975..5861f93 100644 --- a/README.md +++ b/README.md @@ -71,8 +71,8 @@ console.log(tree.verify(proof, leaf, root)) // true const badLeaves = ['a', 'x', 'c'].map(x => SHA256(x)) const badTree = new MerkleTree(badLeaves, SHA256) const badLeaf = SHA256('x') -const badProof = tree.getProof(badLeaf) -console.log(tree.verify(badProof, leaf, root)) // false +const badProof = badTree.getProof(badLeaf) +console.log(badTree.verify(badProof, badLeaf, root)) // false ``` Print tree to console: