diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2018-11-05 14:43:58 +0000 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2018-11-05 14:47:52 +0000 |
commit | ac23b10f152b483116419418c4cb11849285cf92 (patch) | |
tree | fbe7174f9081162ebcc655e831bc0ec24e93d313 /src | |
parent | blockchain: use uint64_t for block height, not size_t (diff) | |
download | monero-ac23b10f152b483116419418c4cb11849285cf92.tar.xz |
blockchain: fix innocuous difficulty cache inconsistency
This inconsistent state would not actually be used in practice
Diffstat (limited to 'src')
-rw-r--r-- | src/cryptonote_core/blockchain.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/cryptonote_core/blockchain.cpp b/src/cryptonote_core/blockchain.cpp index e69ea6b08..82f8579b1 100644 --- a/src/cryptonote_core/blockchain.cpp +++ b/src/cryptonote_core/blockchain.cpp @@ -831,6 +831,7 @@ difficulty_type Blockchain::get_difficulty_for_next_block() std::vector<uint64_t> timestamps; std::vector<difficulty_type> difficulties; auto height = m_db->height(); + top_hash = get_tail_id(); // get it again now that we have the lock // ND: Speedup // 1. Keep a list of the last 735 (or less) blocks that is used to compute difficulty, // then when the next block difficulty is queried, push the latest height data and |