mirror of
https://github.com/tornadocash/tornado-core.git
synced 2024-12-25 14:29:22 -05:00
change zero to local variable
This commit is contained in:
parent
27e3121bb0
commit
1fd0c7fdea
@ -35,7 +35,7 @@ contract MerkleTreeWithHistory {
|
|||||||
levels = _treeLevels;
|
levels = _treeLevels;
|
||||||
|
|
||||||
uint256 currentZero = ZERO_VALUE;
|
uint256 currentZero = ZERO_VALUE;
|
||||||
zeros.push(ZERO_VALUE);
|
zeros.push(currentZero);
|
||||||
filledSubtrees.push(currentZero);
|
filledSubtrees.push(currentZero);
|
||||||
|
|
||||||
for (uint8 i = 1; i < levels; i++) {
|
for (uint8 i = 1; i < levels; i++) {
|
||||||
@ -55,12 +55,9 @@ contract MerkleTreeWithHistory {
|
|||||||
require(_right < FIELD_SIZE, "_right should be inside the field");
|
require(_right < FIELD_SIZE, "_right should be inside the field");
|
||||||
uint256 R = _left;
|
uint256 R = _left;
|
||||||
uint256 C = 0;
|
uint256 C = 0;
|
||||||
|
|
||||||
(R, C) = Hasher.MiMCSponge(R, C, 0);
|
(R, C) = Hasher.MiMCSponge(R, C, 0);
|
||||||
|
|
||||||
R = addmod(R, _right, FIELD_SIZE);
|
R = addmod(R, _right, FIELD_SIZE);
|
||||||
(R, C) = Hasher.MiMCSponge(R, C, 0);
|
(R, C) = Hasher.MiMCSponge(R, C, 0);
|
||||||
|
|
||||||
return R;
|
return R;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user