diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2018-07-06 19:11:01 +0100 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2018-07-07 19:34:21 +0100 |
commit | 8c0523771feba590b4bcee2616db5685b1ccb2a1 (patch) | |
tree | 32e12fde2fcc79564cd0a0ea6741dca6b4eafd59 /src | |
parent | Merge pull request #4094 (diff) | |
download | monero-8c0523771feba590b4bcee2616db5685b1ccb2a1.tar.xz |
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
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 73ce98366..fc16138d6 100644 --- a/src/cryptonote_core/blockchain.cpp +++ b/src/cryptonote_core/blockchain.cpp @@ -3653,6 +3653,7 @@ leave: // appears to be a NOP *and* is called elsewhere. wat? m_tx_pool.on_blockchain_inc(new_height, id); + get_difficulty_for_next_block(); // just to cache it return true; } |