Further fixes from code review

This commit is contained in:
Glenn Willen 2023-01-04 16:33:35 -08:00
parent b9b7f6543a
commit 8cad8cda44
4 changed files with 15 additions and 12 deletions

View file

@ -911,7 +911,7 @@ bool PeerManagerImpl::TipMayBeStale()
bool PeerManagerImpl::CanDirectFetch()
{
if(!m_chainman.ActiveChain().Tip()) {
LogPrint(BCLog::NET, "Startup crash avoided\n");
LogPrint(BCLog::NET, "Tried to call CanDirectFetch with no currently-active chain.\n");
return false;
}
return m_chainman.ActiveChain().Tip()->GetBlockTime() > GetAdjustedTime() - m_chainparams.GetConsensus().nPowTargetSpacing * 20;