Skip to content

Commit

Permalink
fix: minors after rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
0xjei committed Apr 18, 2024
1 parent 198d6e7 commit 8182001
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
2 changes: 1 addition & 1 deletion circuits/circom/tallyVotes.circom
Original file line number Diff line number Diff line change
Expand Up @@ -531,4 +531,4 @@ template TallyVotesInputHasher() {
currentTallyCommitment,
newTallyCommitment
]);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ describe("StateLeafAndBallotTransformer circuit", function test() {
expect(isValid.toString()).to.be.eq("0");
});

it("should output existing state leaf and ballot values if the command is invalid", async () => {
it("should output existing state leaf and ballot values if the command is invalid (non quadratic-voting)", async () => {
const circuitInputs = {
numSignUps,
maxVoteOptions,
Expand Down
13 changes: 6 additions & 7 deletions circuits/ts/__tests__/TallyVotes.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ describe("TallyVotes circuit", function test() {
await circuit.expectConstraintPass(witness);
});

it("should produce the correct result if the initial tally is not zero", async () => {
it("should produce the correct result if the inital tally is not zero", async () => {
const generatedInputs = poll.tallyVotes() as unknown as ITallyVotesInputs;

// Start the tally from non-zero value
Expand Down Expand Up @@ -214,14 +214,13 @@ describe("TallyVotes circuit", function test() {
});

it("should produce the correct result commitments", async () => {
const generatedInputs = poll.tallyVotesNonQv() as unknown as ITallyVotesInputs;

const witness = await circuitNonQv.calculateWitness(generatedInputs);
await circuitNonQv.expectConstraintPass(witness);
const generatedInputs = poll.tallyVotes() as unknown as ITallyVotesInputs;
const witness = await circuit.calculateWitness(generatedInputs);
await circuit.expectConstraintPass(witness);
});

it("should produce the correct result if the initial tally is not zero", async () => {
const generatedInputs = poll.tallyVotesNonQv() as unknown as ITallyVotesInputs;
it("should produce the correct result if the inital tally is not zero", async () => {
const generatedInputs = poll.tallyVotes() as unknown as ITallyVotesInputs;

// Start the tally from non-zero value
let randIdx = generateRandomIndex(Object.keys(generatedInputs).length);
Expand Down

0 comments on commit 8182001

Please sign in to comment.