MCPcopy Create free account
hub / github.com/ElementsProject/elements / TipMayBeStale

Method TipMayBeStale

src/net_processing.cpp:983–991  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

981}
982
983bool PeerManagerImpl::TipMayBeStale()
984{
985 AssertLockHeld(cs_main);
986 const Consensus::Params& consensusParams = m_chainparams.GetConsensus();
987 if (m_last_tip_update.load() == 0s) {
988 m_last_tip_update = GetTime<std::chrono::seconds>();
989 }
990 return m_last_tip_update.load() < GetTime<std::chrono::seconds>() - std::chrono::seconds{consensusParams.nPowTargetSpacing * 3} && mapBlocksInFlight.empty();
991}
992
993bool PeerManagerImpl::CanDirectFetch()
994{

Callers

nothing calls this directly

Calls 2

loadMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected