Skip to content

Commit

Permalink
fix tidy
Browse files Browse the repository at this point in the history
  • Loading branch information
alex v committed Aug 30, 2024
1 parent d1df4dd commit c4de034
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/bls/src/bls_c_impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -452,6 +452,8 @@ int blsAggregateVerifyNoCheck(const blsSignature *sig, const blsPublicKey *pubVe
std::vector<std::future<GT>> futuresMiller;
std::vector<std::future<bool>> futures;
size_t numThreads = std::thread::hardware_concurrency();

futures.reserve(numThreads);

while (n > 0) {
size_t m = mcl::fp::min_<size_t>(n, N);
Expand Down
2 changes: 2 additions & 0 deletions src/blsct/range_proof/bulletproofs/range_proof_logic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,8 @@ bool RangeProofLogic<T>::VerifyProofs(
// Vector to hold future results from async tasks
std::vector<std::future<bool>> futures;

futures.reserve(proof_transcripts.size());

// Launch a verification task for each proof transcript in parallel
for (const RangeProofWithTranscript<T>& p : proof_transcripts) {
futures.emplace_back(std::async(std::launch::async, [this, &p, max_mn]() -> bool {
Expand Down

0 comments on commit c4de034

Please sign in to comment.