Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
sklppy88 committed Aug 7, 2024
1 parent f0f28fc commit b535eb9
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ 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 b535eb9

Please sign in to comment.