From d5b16547f703d6fee798e38ff6a42af4128f6ff3 Mon Sep 17 00:00:00 2001 From: Alexey Date: Tue, 5 Nov 2019 12:22:25 +0300 Subject: [PATCH] tidy --- contracts/MerkleTreeWithHistory.sol | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/contracts/MerkleTreeWithHistory.sol b/contracts/MerkleTreeWithHistory.sol index b9ce9ed..7043237 100644 --- a/contracts/MerkleTreeWithHistory.sol +++ b/contracts/MerkleTreeWithHistory.sol @@ -50,7 +50,7 @@ contract MerkleTreeWithHistory { /** @dev Hash 2 tree leaves, returns MiMC(_left, _right) */ - function hashLeftRight(uint256 _left, uint256 _right) public pure returns (uint256 hash) { + function hashLeftRight(uint256 _left, uint256 _right) public pure returns (uint256) { require(_left < FIELD_SIZE, "_left should be inside the field"); require(_right < FIELD_SIZE, "_right should be inside the field"); uint256 R = _left; @@ -112,18 +112,6 @@ contract MerkleTreeWithHistory { } } return false; - - // or we can do that in other way - // uint256 i = currentRootIndex; - // do { - // if (root == roots[i]) { - // return true; - // } - // if (i == 0) { - // i = ROOT_HISTORY_SIZE; - // } - // i--; - // } while (i != currentRootIndex); } /**