1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
crate::ix!();

#[LOCKS_EXCLUDED(cs_main)]
pub fn notify_header_tip(chainstate: &mut ChainState) -> bool {
    
    todo!();
        /*
            bool fNotify = false;
        bool fInitialBlockDownload = false;
        static CBlockIndex* pindexHeaderOld = nullptr;
        CBlockIndex* pindexHeader = nullptr;
        {
            LOCK(cs_main);
            pindexHeader = pindexBestHeader;

            if (pindexHeader != pindexHeaderOld) {
                fNotify = true;
                fInitialBlockDownload = chainstate.IsInitialBlockDownload();
                pindexHeaderOld = pindexHeader;
            }
        }
        // Send block tip changed notifications without cs_main
        if (fNotify) {
            uiInterface.NotifyHeaderTip(GetSynchronizationState(fInitialBlockDownload), pindexHeader);
        }
        return fNotify;
        */
}