Browse Source

Update MerkleProof.sol (#1997)

William Entriken 5 years ago
parent
commit
95e54173e9
1 changed files with 1 additions and 1 deletions
  1. 1 1
      contracts/cryptography/MerkleProof.sol

+ 1 - 1
contracts/cryptography/MerkleProof.sol

@@ -16,7 +16,7 @@ library MerkleProof {
         for (uint256 i = 0; i < proof.length; i++) {
         for (uint256 i = 0; i < proof.length; i++) {
             bytes32 proofElement = proof[i];
             bytes32 proofElement = proof[i];
 
 
-            if (computedHash < proofElement) {
+            if (computedHash <= proofElement) {
                 // Hash(current computed hash + current element of the proof)
                 // Hash(current computed hash + current element of the proof)
                 computedHash = keccak256(abi.encodePacked(computedHash, proofElement));
                 computedHash = keccak256(abi.encodePacked(computedHash, proofElement));
             } else {
             } else {