aboutsummaryrefslogtreecommitdiff
path: root/src/cryptonote_core/tx_pool.h
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2018-10-31 13:52:16 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2018-11-01 15:51:28 +0000
commitbf31447e9bd9e424538abc8f4cb57bd133f439ed (patch)
treec5efdd4927541675d5bdc8267f402ead0c6992fc /src/cryptonote_core/tx_pool.h
parenttx_pool: remove unnecessary get_transaction_hash (diff)
downloadmonero-bf31447e9bd9e424538abc8f4cb57bd133f439ed.tar.xz
tx_pool: speed up take_tx for transactions from blocks
This happens for every historical tx when syncing, and the unnecessary parsing is actually showing up on profile. Since these are kept cached for just one block, this does not increase memory usage after syncing.
Diffstat (limited to 'src/cryptonote_core/tx_pool.h')
-rw-r--r--src/cryptonote_core/tx_pool.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/cryptonote_core/tx_pool.h b/src/cryptonote_core/tx_pool.h
index 09d134d7b..6270a30bf 100644
--- a/src/cryptonote_core/tx_pool.h
+++ b/src/cryptonote_core/tx_pool.h
@@ -584,6 +584,8 @@ private:
size_t m_txpool_weight;
mutable std::unordered_map<crypto::hash, std::tuple<bool, tx_verification_context, uint64_t, crypto::hash>> m_input_cache;
+
+ std::unordered_map<crypto::hash, transaction> m_parsed_tx_cache;
};
}