diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2019-03-26 11:51:13 +0000 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2019-03-28 18:07:57 +0000 |
commit | 9b687c7873f297b23e643a43b09193d2bdb5e095 (patch) | |
tree | aeb7a3c0ea265d2a7e7a93969802dde6504c3ab0 /src/cryptonote_core/blockchain.h | |
parent | Merge pull request #5286 (diff) | |
download | monero-9b687c7873f297b23e643a43b09193d2bdb5e095.tar.xz |
blockchain: simple cache for the long term block weights
Diffstat (limited to 'src/cryptonote_core/blockchain.h')
-rw-r--r-- | src/cryptonote_core/blockchain.h | 2 |
1 files changed, 2 insertions, 0 deletions
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<uint64_t> m_long_term_block_weights_cache; epee::critical_section m_difficulty_lock; crypto::hash m_difficulty_for_next_block_top_hash; |