aboutsummaryrefslogtreecommitdiff
path: root/src/cryptonote_core/blockchain.cpp
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2018-07-06 19:11:01 +0100
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2018-07-07 19:34:21 +0100
commit8c0523771feba590b4bcee2616db5685b1ccb2a1 (patch)
tree32e12fde2fcc79564cd0a0ea6741dca6b4eafd59 /src/cryptonote_core/blockchain.cpp
parentMerge pull request #4094 (diff)
downloadmonero-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/cryptonote_core/blockchain.cpp')
-rw-r--r--src/cryptonote_core/blockchain.cpp1
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;
}