Skip to content

Commit

Permalink
fix(core/ts/macistate.ts): fix nothing_up_to_my_sleeve bug in MaciSta…
Browse files Browse the repository at this point in the history
…te.ts as well as unit tests

(1) fix nothing_up_to_my_sleeve bug in MaciState.ts (2) fix processMessage unit test in circuits
folder
  • Loading branch information
chaosma committed Nov 10, 2022
1 parent 82b9102 commit 3d2b21f
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 7 deletions.
3 changes: 0 additions & 3 deletions circuits/ts/__tests__/ProcessMessages.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,6 @@ describe('ProcessMessage circuit', () => {
const message = command.encrypt(signature, sharedKey)
messages.push(message)
commands.push(command)
messageTree.insert(NOTHING_UP_MY_SLEEVE);
messageTree.insert(message.hash(ecdhKeypair.pubKey))

poll.publishMessage(message, ecdhKeypair.pubKey)
Expand Down Expand Up @@ -307,7 +306,6 @@ describe('ProcessMessage circuit', () => {
const message = command.encrypt(signature, sharedKey)
messages.push(message)
commands.push(command)
messageTree.insert(NOTHING_UP_MY_SLEEVE);
messageTree.insert(message.hash(ecdhKeypair.pubKey))
poll.publishMessage(message, ecdhKeypair.pubKey)

Expand Down Expand Up @@ -426,7 +424,6 @@ describe('ProcessMessage circuit', () => {
const message = command.encrypt(signature, sharedKey)
messages.push(message)
commands.push(command)
messageTree.insert(NOTHING_UP_MY_SLEEVE);
messageTree.insert(message.hash(ecdhKeypair.pubKey))
poll.publishMessage(message, ecdhKeypair.pubKey)

Expand Down
1 change: 0 additions & 1 deletion circuits/ts/__tests__/TallyVotes.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,6 @@ describe('TallyVotes circuit', () => {
const message = command.encrypt(signature, sharedKey)
messages.push(message)
commands.push(command)
messageTree.insert(NOTHING_UP_MY_SLEEVE);
messageTree.insert(message.hash(ecdhKeypair.pubKey))

poll.publishMessage(message, ecdhKeypair.pubKey)
Expand Down
3 changes: 0 additions & 3 deletions core/ts/MaciState.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,9 +139,6 @@ class Poll {
NOTHING_UP_MY_SLEEVE,
)

this.messageAq.enqueue(NOTHING_UP_MY_SLEEVE);
this.messageTree.insert(NOTHING_UP_MY_SLEEVE);

for (let i = 0; i < this.maxValues.maxVoteOptions; i ++) {
this.results.push(BigInt(0))
this.perVOSpentVoiceCredits.push(BigInt(0))
Expand Down

0 comments on commit 3d2b21f

Please sign in to comment.