mirror of
https://github.com/tornadocash/tornado-core.git
synced 2024-10-01 01:06:17 -04:00
rename multiplexor
This commit is contained in:
parent
e6a4208b52
commit
c0e81f2a37
@ -15,7 +15,7 @@ template HashLeftRight() {
|
||||
|
||||
// if s == 0 returns [in[0], in[1]]
|
||||
// if s == 1 returns [in[1], in[0]]
|
||||
template Mux() {
|
||||
template DualMux() {
|
||||
signal input in[2];
|
||||
signal input s;
|
||||
signal output out[2];
|
||||
@ -36,7 +36,7 @@ template MerkleTree(levels) {
|
||||
component hashers[levels];
|
||||
|
||||
for (var i = 0; i < levels; i++) {
|
||||
selectors[i] = Mux();
|
||||
selectors[i] = DualMux();
|
||||
selectors[i].in[0] <== i == 0 ? leaf : hashers[i - 1].hash;
|
||||
selectors[i].in[1] <== pathElements[i];
|
||||
selectors[i].s <== pathIndices[i];
|
||||
|
Loading…
Reference in New Issue
Block a user