From 9b687c7873f297b23e643a43b09193d2bdb5e095 Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Tue, 26 Mar 2019 11:51:13 +0000 Subject: blockchain: simple cache for the long term block weights --- src/cryptonote_core/blockchain.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/cryptonote_core/blockchain.h') diff --git a/src/cryptonote_core/blockchain.h b/src/cryptonote_core/blockchain.h index 3b8169764..6b4d74cfe 100644 --- a/src/cryptonote_core/blockchain.h +++ b/src/cryptonote_core/blockchain.h @@ -1060,6 +1060,8 @@ namespace cryptonote uint64_t m_timestamps_and_difficulties_height; uint64_t m_long_term_block_weights_window; uint64_t m_long_term_effective_median_block_weight; + mutable crypto::hash m_long_term_block_weights_cache_tip_hash; + mutable std::vector m_long_term_block_weights_cache; epee::critical_section m_difficulty_lock; crypto::hash m_difficulty_for_next_block_top_hash; -- cgit v1.2.3