| 991 | } |
| 992 | |
| 993 | bool PeerManagerImpl::CanDirectFetch() |
| 994 | { |
| 995 | if(!m_chainman.ActiveChain().Tip()) { |
| 996 | LogPrint(BCLog::NET, "Tried to call CanDirectFetch with no currently-active chain.\n"); |
| 997 | return false; |
| 998 | } |
| 999 | return m_chainman.ActiveChain().Tip()->GetBlockTime() > GetAdjustedTime() - m_chainparams.GetConsensus().nPowTargetSpacing * 20; |
| 1000 | } |
| 1001 | |
| 1002 | static bool PeerHasHeader(CNodeState *state, const CBlockIndex *pindex) EXCLUSIVE_LOCKS_REQUIRED(cs_main) |
| 1003 | { |
nothing calls this directly
no test coverage detected