aboutsummaryrefslogtreecommitdiff
path: root/src/cryptonote_core
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2018-11-11 14:51:03 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2019-03-25 13:42:18 +0000
commit3bbc36614717a85c02763cf3deb761f039e9fa10 (patch)
treea0f54a6e2b91480ada5b234287c164f16469ab17 /src/cryptonote_core
parentMerge pull request #5286 (diff)
downloadmonero-3bbc36614717a85c02763cf3deb761f039e9fa10.tar.xz
Avoid repeated (de)serialization when syncing
Diffstat (limited to 'src/cryptonote_core')
-rw-r--r--src/cryptonote_core/blockchain.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/cryptonote_core/blockchain.cpp b/src/cryptonote_core/blockchain.cpp
index f5bd9bbb5..d110cc139 100644
--- a/src/cryptonote_core/blockchain.cpp
+++ b/src/cryptonote_core/blockchain.cpp
@@ -3706,8 +3706,7 @@ leave:
try
{
uint64_t long_term_block_weight = get_next_long_term_block_weight(block_weight);
- cryptonote::blobdata bd = cryptonote::block_to_blob(bl);
- new_height = m_db->add_block(std::make_pair(std::move(bl), std::move(bd)), block_weight, long_term_block_weight, cumulative_difficulty, already_generated_coins, txs);
+ new_height = m_db->add_block(std::make_pair(std::move(bl), cryptonote::block_to_blob(bl)), block_weight, long_term_block_weight, cumulative_difficulty, already_generated_coins, txs);
}
catch (const KEY_IMAGE_EXISTS& e)
{