Skip to content

Commit 7a29f7d

Browse files
alexfertelAmxx
andauthored
Improve MerkleProof tests (#4937)
Co-authored-by: Hadrien Croubois <[email protected]>
1 parent c8369d4 commit 7a29f7d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

test/utils/cryptography/MerkleProof.test.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,12 @@ describe('MerkleProof', function () {
5555
const merkleTree = StandardMerkleTree.of(toElements('abc'), ['string']);
5656

5757
const root = merkleTree.root;
58-
const leaf = merkleTree.leafHash(['a']);
58+
const hash = merkleTree.leafHash(['a']);
5959
const proof = merkleTree.getProof(['a']);
60-
const badProof = proof.slice(0, proof.length - 5);
60+
const badProof = proof.slice(0, -1);
6161

62-
expect(await this.mock.$verify(badProof, root, leaf)).to.be.false;
63-
expect(await this.mock.$verifyCalldata(badProof, root, leaf)).to.be.false;
62+
expect(await this.mock.$verify(badProof, root, hash)).to.be.false;
63+
expect(await this.mock.$verifyCalldata(badProof, root, hash)).to.be.false;
6464
});
6565
});
6666

0 commit comments

Comments
 (0)