mirror of
https://github.com/monero-project/monero.git
synced 2025-08-09 13:32:20 -04:00
Avoid some temporary strings when reading off the database
This commit is contained in:
parent
43a4fd9e16
commit
55363c5941
11 changed files with 92 additions and 92 deletions
|
@ -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");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue