From 66754181f23bc26f5ad7848665435354fdf3324e Mon Sep 17 00:00:00 2001 From: poma Date: Fri, 19 Jul 2019 15:06:06 +0300 Subject: [PATCH] fix test, silence ganache in travis --- .travis.yml | 2 +- test/Mixer.test.js | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 770eacf..f3cd9de 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,7 +7,7 @@ install: - cp .env.example .env - travis_wait 30 npm run build:circuit - npm run build:contract - - npx ganache-cli & + - npx ganache-cli > /dev/null & - npm run migrate:dev script: - npm run test diff --git a/test/Mixer.test.js b/test/Mixer.test.js index 53a666b..b89056a 100644 --- a/test/Mixer.test.js +++ b/test/Mixer.test.js @@ -14,7 +14,7 @@ const { AMOUNT, MERKLE_TREE_HEIGHT, EMPTY_ELEMENT } = process.env const websnarkUtils = require('websnark/src/utils') const buildGroth16 = require('websnark/src/groth16') const stringifyBigInts = require('websnark/tools/stringifybigint').stringifyBigInts -const unstringifyBigInts = require('websnark/tools/stringifybigint').unstringifyBigInts +const unstringifyBigInts2 = require('snarkjs/src/stringifybigint').unstringifyBigInts const snarkjs = require('snarkjs') const bigInt = snarkjs.bigInt const crypto = require('crypto') @@ -52,8 +52,8 @@ function getRandomReceiver() { } function snarkVerify(proof) { - proof = unstringifyBigInts(websnarkUtils.fromSolidityInput(proof)) - const verification_key = unstringifyBigInts(require('../build/circuits/withdraw_verification_key.json')) + proof = unstringifyBigInts2(websnarkUtils.fromSolidityInput(proof)) + const verification_key = unstringifyBigInts2(require('../build/circuits/withdraw_verification_key.json')) return snarkjs['groth'].isValid(verification_key, proof, proof.publicSignals) }