mirror of
https://git.wownero.com/wownero/wownero.git
synced 2024-08-15 01:03:23 +00:00
blockchain: cache next block difficulty after adding a block
It's not 100% certain it'll be needed, but it avoids getinfo needing the blockchain lock and potentially blocking
This commit is contained in:
parent
eed4dba880
commit
8c0523771f
1 changed files with 1 additions and 0 deletions
|
@ -3653,6 +3653,7 @@ leave:
|
||||||
|
|
||||||
// appears to be a NOP *and* is called elsewhere. wat?
|
// appears to be a NOP *and* is called elsewhere. wat?
|
||||||
m_tx_pool.on_blockchain_inc(new_height, id);
|
m_tx_pool.on_blockchain_inc(new_height, id);
|
||||||
|
get_difficulty_for_next_block(); // just to cache it
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue