From 51a64110972914d2f3a7cb7aafa4abe33e7ca992 Mon Sep 17 00:00:00 2001 From: sina Date: Sat, 8 Oct 2022 23:15:18 -0700 Subject: [PATCH] Update verifier_groth16.sol.ejs Minor optimization; rather than checking the condition and then returning `true` or `false`, we can just return the condition. --- templates/verifier_groth16.sol.ejs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/templates/verifier_groth16.sol.ejs b/templates/verifier_groth16.sol.ejs index 707b2b54..c863b95d 100644 --- a/templates/verifier_groth16.sol.ejs +++ b/templates/verifier_groth16.sol.ejs @@ -241,10 +241,6 @@ contract Verifier { for(uint i = 0; i < input.length; i++){ inputValues[i] = input[i]; } - if (verify(inputValues, proof) == 0) { - return true; - } else { - return false; - } + return verify(inputValues, proof) == 0; } }