From 8c0523771feba590b4bcee2616db5685b1ccb2a1 Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Fri, 6 Jul 2018 19:11:01 +0100 Subject: [PATCH] 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 --- src/cryptonote_core/blockchain.cpp | 1 + 1 file changed, 1 insertion(+) 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; }