mirror of
https://github.com/tornadocash/tornado-core.git
synced 2024-10-01 01:06:17 -04:00
change zero value constant
This commit is contained in:
parent
0393ee9c05
commit
e6a4208b52
@ -17,7 +17,7 @@ library Hasher {
|
|||||||
|
|
||||||
contract MerkleTreeWithHistory {
|
contract MerkleTreeWithHistory {
|
||||||
uint256 public constant FIELD_SIZE = 21888242871839275222246405745257275088548364400416034343698204186575808495617;
|
uint256 public constant FIELD_SIZE = 21888242871839275222246405745257275088548364400416034343698204186575808495617;
|
||||||
uint256 public constant ZERO_VALUE = 5702960885942360421128284892092891246826997279710054143430547229469817701242; // = MiMC("tornado")
|
uint256 public constant ZERO_VALUE = 21663839004416932945382355908790599225266501822907911457504978515578255421292; // = keccak256("tornado") % FIELD_SIZE
|
||||||
|
|
||||||
uint32 public levels;
|
uint32 public levels;
|
||||||
|
|
||||||
|
@ -11,7 +11,7 @@ class MerkleTree {
|
|||||||
this.zero_values = []
|
this.zero_values = []
|
||||||
this.totalElements = 0
|
this.totalElements = 0
|
||||||
|
|
||||||
let current_zero_value = '5702960885942360421128284892092891246826997279710054143430547229469817701242'
|
let current_zero_value = '21663839004416932945382355908790599225266501822907911457504978515578255421292'
|
||||||
this.zero_values.push(current_zero_value)
|
this.zero_values.push(current_zero_value)
|
||||||
for (let i = 0; i < n_levels; i++) {
|
for (let i = 0; i < n_levels; i++) {
|
||||||
current_zero_value = this.hasher.hash(i, current_zero_value, current_zero_value)
|
current_zero_value = this.hasher.hash(i, current_zero_value, current_zero_value)
|
||||||
|
Loading…
Reference in New Issue
Block a user