aboutsummaryrefslogtreecommitdiff
path: root/src/cryptonote_core/blockchain.cpp
diff options
context:
space:
mode:
authorAlexander Blair <snipa@jagtech.io>2020-08-27 02:52:48 -0700
committerAlexander Blair <snipa@jagtech.io>2020-08-27 02:52:59 -0700
commit38914fe6fadaaf8585c1961d4bdf954ccc844bde (patch)
tree6a2ab535da02a6ea53cc15ae37228d90e91fd2e9 /src/cryptonote_core/blockchain.cpp
parentaadd72202f9d43cdbe9b79f4eef2d44a3c9e2971 (diff)
parent55363c59411cbaf8347d55e6ac7cdda3b34db7d2 (diff)
downloadmonzero-core-38914fe6fadaaf8585c1961d4bdf954ccc844bde.tar.gz
monzero-core-38914fe6fadaaf8585c1961d4bdf954ccc844bde.tar.xz
monzero-core-38914fe6fadaaf8585c1961d4bdf954ccc844bde.zip
Merge pull request #6613
55363c594 Avoid some temporary strings when reading off the database (moneromooo-monero)
Diffstat (limited to 'src/cryptonote_core/blockchain.cpp')
-rw-r--r--src/cryptonote_core/blockchain.cpp6
1 files changed, 3 insertions, 3 deletions
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<block>& 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<bool(const crypto::hash&, const txpool_tx_meta_t&, const cryptonote::blobdata*)> f, bool include_blob, relay_category tx_category) const
+bool Blockchain::for_all_txpool_txes(std::function<bool(const crypto::hash&, const txpool_tx_meta_t&, const cryptonote::blobdata_ref*)> 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<std::pair<Blockchain::block_extended_info,std::vector<crypto::hash>>
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");