mirror of
https://git.wownero.com/wownero/wownero.git
synced 2024-08-15 01:03:23 +00:00
blockchain: fix innocuous difficulty cache inconsistency
This inconsistent state would not actually be used in practice
This commit is contained in:
parent
3b14d9727b
commit
ac23b10f15
1 changed files with 1 additions and 0 deletions
|
@ -831,6 +831,7 @@ difficulty_type Blockchain::get_difficulty_for_next_block()
|
||||||
std::vector<uint64_t> timestamps;
|
std::vector<uint64_t> timestamps;
|
||||||
std::vector<difficulty_type> difficulties;
|
std::vector<difficulty_type> difficulties;
|
||||||
auto height = m_db->height();
|
auto height = m_db->height();
|
||||||
|
top_hash = get_tail_id(); // get it again now that we have the lock
|
||||||
// ND: Speedup
|
// ND: Speedup
|
||||||
// 1. Keep a list of the last 735 (or less) blocks that is used to compute difficulty,
|
// 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
|
// then when the next block difficulty is queried, push the latest height data and
|
||||||
|
|
Loading…
Reference in a new issue