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:
moneromooo-monero 2018-07-06 19:11:01 +01:00 committed by wowario
parent e2a3f71870
commit 13e9035505
No known key found for this signature in database
GPG Key ID: 24DCBE762DE9C111

View File

@ -3622,6 +3622,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;
}