Add tests, docs and MerkleTree helper

This commit is contained in:
Yondon Fu
2017-06-15 11:07:22 -04:00
parent 3c4d0d0a77
commit 2e0bd06da2
4 changed files with 177 additions and 43 deletions

View File

@ -0,0 +1,9 @@
MerkleProof
=============================================
Merkle proof verification for leaves of a Merkle tree.
verifyProof(bytes _proof, bytes32 _root, bytes32 _leaf) internal constant returns (bool)
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
Verifies a Merkle proof proving the existence of a leaf in a Merkle tree. Assumes that each pair of leaves and each pair of pre-images is sorted.