From c4de034c4495d79346b37f2818a0331aa9d49c92 Mon Sep 17 00:00:00 2001 From: alex v Date: Fri, 30 Aug 2024 20:06:43 +0200 Subject: [PATCH] fix tidy --- src/bls/src/bls_c_impl.hpp | 2 ++ src/blsct/range_proof/bulletproofs/range_proof_logic.cpp | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/bls/src/bls_c_impl.hpp b/src/bls/src/bls_c_impl.hpp index ae30960489b6d..bb1fba857abf0 100644 --- a/src/bls/src/bls_c_impl.hpp +++ b/src/bls/src/bls_c_impl.hpp @@ -452,6 +452,8 @@ int blsAggregateVerifyNoCheck(const blsSignature *sig, const blsPublicKey *pubVe std::vector> futuresMiller; std::vector> futures; size_t numThreads = std::thread::hardware_concurrency(); + + futures.reserve(numThreads); while (n > 0) { size_t m = mcl::fp::min_(n, N); diff --git a/src/blsct/range_proof/bulletproofs/range_proof_logic.cpp b/src/blsct/range_proof/bulletproofs/range_proof_logic.cpp index 0524f9fdab11c..c0d8a3ea3c24b 100644 --- a/src/blsct/range_proof/bulletproofs/range_proof_logic.cpp +++ b/src/blsct/range_proof/bulletproofs/range_proof_logic.cpp @@ -253,6 +253,8 @@ bool RangeProofLogic::VerifyProofs( // Vector to hold future results from async tasks std::vector> futures; + futures.reserve(proof_transcripts.size()); + // Launch a verification task for each proof transcript in parallel for (const RangeProofWithTranscript& p : proof_transcripts) { futures.emplace_back(std::async(std::launch::async, [this, &p, max_mn]() -> bool {