File tree Expand file tree Collapse file tree 4 files changed +4
-0
lines changed Expand file tree Collapse file tree 4 files changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -123,6 +123,7 @@ static RPCHelpMan createmultisig()
123
123
// Get the public keys
124
124
const UniValue& keys = request.params [1 ].get_array ();
125
125
std::vector<CPubKey> pubkeys;
126
+ pubkeys.reserve (keys.size ());
126
127
for (unsigned int i = 0 ; i < keys.size (); ++i) {
127
128
pubkeys.push_back (HexToPubKey (keys[i].get_str ()));
128
129
}
Original file line number Diff line number Diff line change @@ -360,6 +360,7 @@ BOOST_AUTO_TEST_CASE(test_CheckQueueControl_Locks)
360
360
auto queue = std::make_unique<Standard_Queue>(QUEUE_BATCH_SIZE, SCRIPT_CHECK_THREADS);
361
361
{
362
362
std::vector<std::thread> tg;
363
+ tg.reserve (3 );
363
364
std::atomic<int > nThreads {0 };
364
365
std::atomic<int > fails {0 };
365
366
for (size_t i = 0 ; i < 3 ; ++i) {
Original file line number Diff line number Diff line change @@ -224,6 +224,7 @@ void test_cache_erase_parallel(size_t megabytes)
224
224
/* * Spin up 3 threads to run contains with erase.
225
225
*/
226
226
std::vector<std::thread> threads;
227
+ threads.reserve (3 );
227
228
/* * Erase the first quarter */
228
229
for (uint32_t x = 0 ; x < 3 ; ++x)
229
230
/* * Each thread is emplaced with x copy-by-value
Original file line number Diff line number Diff line change @@ -428,6 +428,7 @@ BOOST_AUTO_TEST_CASE(rpc_getblockstats_calculate_percentiles_by_weight)
428
428
{
429
429
int64_t total_weight = 200 ;
430
430
std::vector<std::pair<CAmount, int64_t >> feerates;
431
+ feerates.reserve (200 );
431
432
CAmount result[NUM_GETBLOCKSTATS_PERCENTILES] = { 0 };
432
433
433
434
for (int64_t i = 0 ; i < 100 ; i++) {
You can’t perform that action at this time.
0 commit comments