From a3354b5c8c43a4ec320872d99533d5b68b1dcd91 Mon Sep 17 00:00:00 2001 From: Polina Chernyshova Date: Wed, 22 Mar 2023 10:45:40 +0000 Subject: [PATCH] minor updates #116 --- include/nil/blueprint/utils/satisfiability_check.hpp | 4 ++++ test/test_plonk_component.hpp | 6 +++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/include/nil/blueprint/utils/satisfiability_check.hpp b/include/nil/blueprint/utils/satisfiability_check.hpp index d156fa087b..ff8a845095 100644 --- a/include/nil/blueprint/utils/satisfiability_check.hpp +++ b/include/nil/blueprint/utils/satisfiability_check.hpp @@ -92,6 +92,10 @@ namespace nil { } } + if (!must_pass) { + std::cout << "All constraints are satisfied." << std::endl; + return false; + } return true; } diff --git a/test/test_plonk_component.hpp b/test/test_plonk_component.hpp index 1ff9cec803..5833782e2f 100644 --- a/test/test_plonk_component.hpp +++ b/test/test_plonk_component.hpp @@ -183,7 +183,11 @@ namespace nil { bool verifier_res = zk::snark::placeholder_verifier::process( public_preprocessed_data, proof, bp, fri_params); - BOOST_CHECK(verifier_res); + if (must_pass) { + BOOST_CHECK(verifier_res); + } else { + BOOST_CHECK(!verifier_res); + } #endif } } // namespace crypto3