Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
sklppy88 committed Aug 12, 2024
1 parent 7f1fa2c commit 57952bd
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@ describe('e2e_voting_contract', () => {
await wallet.rotateNullifierKeys();
await crossDelay();

// We try simulating voting again, but our TX is invalid because it will emit duplicate nullifiers
await expect(votingContract.methods.cast_vote(candidate).simulate()).rejects.toThrow(
'The simulated transaction is unable to be added to state and is invalid.',
);

// We try voting again, but our TX is dropped due to trying to emit duplicate nullifiers
await expect(votingContract.methods.cast_vote(candidate).send().wait()).rejects.toThrow(
'Reason: Tx dropped by P2P node.',
Expand Down

0 comments on commit 57952bd

Please sign in to comment.