aboutsummaryrefslogtreecommitdiff
path: root/src/cryptonote_core
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2018-11-19 17:55:53 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2018-11-19 17:57:17 +0000
commit60f36386e4c844040371974f01da07ed02942529 (patch)
tree769d77d229b6eb0e76473ed01608ed3291ec4eb9 /src/cryptonote_core
parentMerge pull request #4820 (diff)
downloadmonero-60f36386e4c844040371974f01da07ed02942529.tar.xz
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.
Diffstat (limited to 'src/cryptonote_core')
-rw-r--r--src/cryptonote_core/blockchain.cpp2
1 files changed, 1 insertions, 1 deletions
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>();
+ block bl;
block_verification_context bvc = boost::value_initialized<block_verification_context>();
generate_genesis_block(bl, get_config(m_nettype).GENESIS_TX, get_config(m_nettype).GENESIS_NONCE);
add_new_block(bl, bvc);