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

Function LOCKS_EXCLUDED

src/validation.cpp:3161–3181  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3159}
3160
3161static bool NotifyHeaderTip(CChainState& chainstate) LOCKS_EXCLUDED(cs_main) {
3162 bool fNotify = false;
3163 bool fInitialBlockDownload = false;
3164 static CBlockIndex* pindexHeaderOld = nullptr;
3165 CBlockIndex* pindexHeader = nullptr;
3166 {
3167 LOCK(cs_main);
3168 pindexHeader = pindexBestHeader;
3169
3170 if (pindexHeader != pindexHeaderOld) {
3171 fNotify = true;
3172 fInitialBlockDownload = chainstate.IsInitialBlockDownload();
3173 pindexHeaderOld = pindexHeader;
3174 }
3175 }
3176 // Send block tip changed notifications without cs_main
3177 if (fNotify) {
3178 uiInterface.NotifyHeaderTip(GetSynchronizationState(fInitialBlockDownload), pindexHeader);
3179 }
3180 return fNotify;
3181}
3182
3183static void LimitValidationInterfaceQueue() LOCKS_EXCLUDED(cs_main) {
3184 AssertLockNotHeld(cs_main);

Callers

nothing calls this directly

Calls 5

GetSynchronizationStateFunction · 0.85
NotifyHeaderTipMethod · 0.80
CallbacksPendingMethod · 0.45

Tested by

no test coverage detected