From 55363c59411cbaf8347d55e6ac7cdda3b34db7d2 Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Tue, 28 May 2019 22:55:48 +0000 Subject: Avoid some temporary strings when reading off the database --- src/cryptonote_core/blockchain.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/cryptonote_core/blockchain.cpp') diff --git a/src/cryptonote_core/blockchain.cpp b/src/cryptonote_core/blockchain.cpp index 882ee4894..853aa065c 100644 --- a/src/cryptonote_core/blockchain.cpp +++ b/src/cryptonote_core/blockchain.cpp @@ -2158,7 +2158,7 @@ bool Blockchain::get_alternative_blocks(std::vector& blocks) const CRITICAL_REGION_LOCAL(m_blockchain_lock); blocks.reserve(m_db->get_alt_block_count()); - m_db->for_all_alt_blocks([&blocks](const crypto::hash &blkid, const cryptonote::alt_block_data_t &data, const cryptonote::blobdata *blob) { + m_db->for_all_alt_blocks([&blocks](const crypto::hash &blkid, const cryptonote::alt_block_data_t &data, const cryptonote::blobdata_ref *blob) { if (!blob) { MERROR("No blob, but blobs were requested"); @@ -5121,7 +5121,7 @@ cryptonote::blobdata Blockchain::get_txpool_tx_blob(const crypto::hash& txid, re return m_db->get_txpool_tx_blob(txid, tx_category); } -bool Blockchain::for_all_txpool_txes(std::function f, bool include_blob, relay_category tx_category) const +bool Blockchain::for_all_txpool_txes(std::function f, bool include_blob, relay_category tx_category) const { return m_db->for_all_txpool_txes(f, include_blob, tx_category); } @@ -5192,7 +5192,7 @@ std::vector> blocks_ext_by_hash alt_blocks; alt_blocks.reserve(m_db->get_alt_block_count()); - m_db->for_all_alt_blocks([&alt_blocks](const crypto::hash &blkid, const cryptonote::alt_block_data_t &data, const cryptonote::blobdata *blob) { + m_db->for_all_alt_blocks([&alt_blocks](const crypto::hash &blkid, const cryptonote::alt_block_data_t &data, const cryptonote::blobdata_ref *blob) { if (!blob) { MERROR("No blob, but blobs were requested"); -- cgit v1.2.3