From 60f36386e4c844040371974f01da07ed02942529 Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Mon, 19 Nov 2018 17:55:53 +0000 Subject: Avoid unnecessary temp block and copy ctor block already has a default ctor, and the extra object churn due to its innards (vectors, etc) is pointless. --- src/cryptonote_core/blockchain.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/cryptonote_core') diff --git a/src/cryptonote_core/blockchain.cpp b/src/cryptonote_core/blockchain.cpp index f3105114e..ae620fc80 100644 --- a/src/cryptonote_core/blockchain.cpp +++ b/src/cryptonote_core/blockchain.cpp @@ -404,7 +404,7 @@ bool Blockchain::init(BlockchainDB* db, const network_type nettype, bool offline if(!m_db->height()) { MINFO("Blockchain not loaded, generating genesis block."); - block bl = boost::value_initialized(); + block bl; block_verification_context bvc = boost::value_initialized(); generate_genesis_block(bl, get_config(m_nettype).GENESIS_TX, get_config(m_nettype).GENESIS_NONCE); add_new_block(bl, bvc); -- cgit v1.2.3