From b1888e58ad88f6b933995e3048ae2615e295aa6e Mon Sep 17 00:00:00 2001 From: sowle Date: Wed, 3 Aug 2022 13:55:45 +0200 Subject: [PATCH] made verify_multiple_zarcanum_outs_range_proofs be happy with empty range proofs vector --- src/currency_core/currency_format_utils.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/currency_core/currency_format_utils.cpp b/src/currency_core/currency_format_utils.cpp index c1e82236..ded03cee 100644 --- a/src/currency_core/currency_format_utils.cpp +++ b/src/currency_core/currency_format_utils.cpp @@ -3609,13 +3609,16 @@ namespace currency //-------------------------------------------------------------------------------- bool verify_multiple_zarcanum_outs_range_proofs(const std::vector& range_proofs) { + if (range_proofs.empty()) + return true; + std::vector sigs; for(auto el : range_proofs) sigs.emplace_back(el.range_proof.bpp, el.amount_commitments); uint8_t err = 0; bool r = crypto::bpp_verify<>(sigs, &err); - CHECK_AND_ASSERT_MES(r, false, "bpp_vefiry failed with error " << err); + CHECK_AND_ASSERT_MES(r, false, "bpp_verify failed with error " << err); return true; }