Skip to content

Commit 2043ecc

Browse files
committed
application.cpp: minor optimization
1 parent 0e86ff5 commit 2043ecc

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

libraries/app/application.cpp

+3-1
Original file line numberDiff line numberDiff line change
@@ -529,10 +529,12 @@ bool application_impl::handle_block(const graphene::net::block_message& blk_msg,
529529
// happens, there's no reason to fetch the transactions, so construct a list of the
530530
// transaction message ids we no longer need.
531531
// during sync, it is unlikely that we'll see any old
532+
contained_transaction_message_ids.reserve( contained_transaction_message_ids.size()
533+
+ blk_msg.block.transactions.size() );
532534
for (const processed_transaction& transaction : blk_msg.block.transactions)
533535
{
534536
graphene::net::trx_message transaction_message(transaction);
535-
contained_transaction_message_ids.push_back(graphene::net::message(transaction_message).id());
537+
contained_transaction_message_ids.emplace_back(graphene::net::message(transaction_message).id());
536538
}
537539
}
538540

0 commit comments

Comments
 (0)