remove redundant check, fixes CVF-18, CVF-19

This commit is contained in:
poma 2021-03-19 22:15:58 +03:00
parent 628d3bd64a
commit 73b9369abc
No known key found for this signature in database
GPG Key ID: BA20CB01FE165657
1 changed files with 0 additions and 2 deletions

View File

@ -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");