From 73b9369abc8d5c7601e7ee79713b3c23764b5c1f Mon Sep 17 00:00:00 2001 From: poma Date: Fri, 19 Mar 2021 22:15:58 +0300 Subject: [PATCH] remove redundant check, fixes CVF-18, CVF-19 --- contracts/TornadoTrees.sol | 2 -- 1 file changed, 2 deletions(-) diff --git a/contracts/TornadoTrees.sol b/contracts/TornadoTrees.sol index 65b2c8e..5452b68 100644 --- a/contracts/TornadoTrees.sol +++ b/contracts/TornadoTrees.sol @@ -123,7 +123,6 @@ contract TornadoTrees is Initializable { TreeLeaf[CHUNK_SIZE] calldata _events ) public { uint256 offset = lastProcessedDepositLeaf; - require(_newRoot != previousDepositRoot, "Outdated deposit root"); require(_currentRoot == depositRoot, "Proposed deposit root is invalid"); require(_pathIndices == offset >> CHUNK_TREE_HEIGHT, "Incorrect deposit insert index"); @@ -168,7 +167,6 @@ contract TornadoTrees is Initializable { TreeLeaf[CHUNK_SIZE] calldata _events ) public { uint256 offset = lastProcessedWithdrawalLeaf; - require(_newRoot != previousWithdrawalRoot, "Outdated withdrawal root"); require(_currentRoot == withdrawalRoot, "Proposed withdrawal root is invalid"); require(_pathIndices == offset >> CHUNK_TREE_HEIGHT, "Incorrect withdrawal insert index");