From 2043ecce8746a56036521ec61008e5d3de105614 Mon Sep 17 00:00:00 2001 From: abitmore Date: Fri, 14 Sep 2018 13:41:04 -0400 Subject: [PATCH] application.cpp: minor optimization --- libraries/app/application.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libraries/app/application.cpp b/libraries/app/application.cpp index 88f6e867af..4e62a6f8f1 100644 --- a/libraries/app/application.cpp +++ b/libraries/app/application.cpp @@ -529,10 +529,12 @@ bool application_impl::handle_block(const graphene::net::block_message& blk_msg, // happens, there's no reason to fetch the transactions, so construct a list of the // transaction message ids we no longer need. // during sync, it is unlikely that we'll see any old + contained_transaction_message_ids.reserve( contained_transaction_message_ids.size() + + blk_msg.block.transactions.size() ); for (const processed_transaction& transaction : blk_msg.block.transactions) { graphene::net::trx_message transaction_message(transaction); - contained_transaction_message_ids.push_back(graphene::net::message(transaction_message).id()); + contained_transaction_message_ids.emplace_back(graphene::net::message(transaction_message).id()); } }