diff options
| author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2021-03-18 10:34:37 +0000 |
|---|---|---|
| committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2021-03-18 11:16:08 +0000 |
| commit | 254a1338adb3c5b62ec55fda5992fa7c9a0ccddd (patch) | |
| tree | d3cb404b2bc6c746b531caede41b26d985be4b8d /src/cryptonote_core/cryptonote_core.cpp | |
| parent | 0b6bfb1fd891a292179cdf0b181ab29b717fc72e (diff) | |
| download | monzero-core-254a1338adb3c5b62ec55fda5992fa7c9a0ccddd.tar.gz monzero-core-254a1338adb3c5b62ec55fda5992fa7c9a0ccddd.tar.xz monzero-core-254a1338adb3c5b62ec55fda5992fa7c9a0ccddd.zip | |
core: speed up print_coinbase_tx_sum
It only needs to parse the tx headers, not the full tx data
Diffstat (limited to 'src/cryptonote_core/cryptonote_core.cpp')
| -rw-r--r-- | src/cryptonote_core/cryptonote_core.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/cryptonote_core/cryptonote_core.cpp b/src/cryptonote_core/cryptonote_core.cpp index 57104fd59..709db575e 100644 --- a/src/cryptonote_core/cryptonote_core.cpp +++ b/src/cryptonote_core/cryptonote_core.cpp @@ -427,9 +427,9 @@ namespace cryptonote return true; } //----------------------------------------------------------------------------------------------- - bool core::get_transactions(const std::vector<crypto::hash>& txs_ids, std::vector<cryptonote::blobdata>& txs, std::vector<crypto::hash>& missed_txs) const + bool core::get_transactions(const std::vector<crypto::hash>& txs_ids, std::vector<cryptonote::blobdata>& txs, std::vector<crypto::hash>& missed_txs, bool pruned) const { - return m_blockchain_storage.get_transactions_blobs(txs_ids, txs, missed_txs); + return m_blockchain_storage.get_transactions_blobs(txs_ids, txs, missed_txs, pruned); } //----------------------------------------------------------------------------------------------- bool core::get_split_transactions_blobs(const std::vector<crypto::hash>& txs_ids, std::vector<std::tuple<crypto::hash, cryptonote::blobdata, crypto::hash, cryptonote::blobdata>>& txs, std::vector<crypto::hash>& missed_txs) const @@ -443,9 +443,9 @@ namespace cryptonote return true; } //----------------------------------------------------------------------------------------------- - bool core::get_transactions(const std::vector<crypto::hash>& txs_ids, std::vector<transaction>& txs, std::vector<crypto::hash>& missed_txs) const + bool core::get_transactions(const std::vector<crypto::hash>& txs_ids, std::vector<transaction>& txs, std::vector<crypto::hash>& missed_txs, bool pruned) const { - return m_blockchain_storage.get_transactions(txs_ids, txs, missed_txs); + return m_blockchain_storage.get_transactions(txs_ids, txs, missed_txs, pruned); } //----------------------------------------------------------------------------------------------- bool core::get_alternative_blocks(std::vector<block>& blocks) const @@ -1241,7 +1241,7 @@ namespace cryptonote std::vector<transaction> txs; std::vector<crypto::hash> missed_txs; uint64_t coinbase_amount = get_outs_money_amount(b.miner_tx); - this->get_transactions(b.tx_hashes, txs, missed_txs); + this->get_transactions(b.tx_hashes, txs, missed_txs, true); uint64_t tx_fee_amount = 0; for(const auto& tx: txs) { |
