clean up tests

This commit is contained in:
Roman Storm 2019-08-01 00:34:22 -07:00
parent 791875ddc5
commit 242a87569b

View File

@ -220,16 +220,10 @@ contract('Mixer', accounts => {
})
it('should prevent double spend', async () => {
const deposit = generateDeposit()
await tree.insert(deposit.commitment)
await mixer.deposit(toBN(deposit.commitment.toString()), { value, from: sender })
const deposit2 = generateDeposit()
await tree.insert(deposit2.commitment)
await mixer.deposit(toBN(deposit2.commitment.toString()), { value, from: sender })
const { root, path_elements, path_index } = await tree.path(0)
const input = stringifyBigInts({
@ -251,16 +245,10 @@ contract('Mixer', accounts => {
})
it('should prevent double spend with overflow', async () => {
const deposit = generateDeposit()
await tree.insert(deposit.commitment)
await mixer.deposit(toBN(deposit.commitment.toString()), { value, from: sender })
const deposit2 = generateDeposit()
await tree.insert(deposit2.commitment)
await mixer.deposit(toBN(deposit2.commitment.toString()), { value, from: sender })
const { root, path_elements, path_index } = await tree.path(0)
const input = stringifyBigInts({