Fix missing cs_main lock for GuessVerificationProgress()

This commit is contained in:
Jonas Schnelli
2018-01-28 09:15:18 -10:00
parent 6970b30c6f
commit 90ba2df11b
3 changed files with 6 additions and 9 deletions

View File

@@ -138,9 +138,9 @@ size_t ClientModel::getMempoolDynamicUsage() const
double ClientModel::getVerificationProgress(const CBlockIndex *tipIn) const
{
CBlockIndex *tip = const_cast<CBlockIndex *>(tipIn);
LOCK(cs_main);
if (!tip)
{
LOCK(cs_main);
tip = chainActive.Tip();
}
return GuessVerificationProgress(Params().TxData(), tip);