| 3904 | } |
| 3905 | |
| 3906 | static void NotifyHeaderTip() { |
| 3907 | bool fNotify = false; |
| 3908 | bool fInitialBlockDownload = false; |
| 3909 | static CBlockIndex* pindexHeaderOld = NULL; |
| 3910 | CBlockIndex* pindexHeader = NULL; |
| 3911 | { |
| 3912 | LOCK(cs_main); |
| 3913 | pindexHeader = pindexBestHeader; |
| 3914 | |
| 3915 | if (pindexHeader != pindexHeaderOld) { |
| 3916 | fNotify = true; |
| 3917 | fInitialBlockDownload = IsInitialBlockDownload(); |
| 3918 | pindexHeaderOld = pindexHeader; |
| 3919 | } |
| 3920 | } |
| 3921 | // Send block tip changed notifications without cs_main |
| 3922 | if (fNotify) { |
| 3923 | uiInterface.NotifyHeaderTip(fInitialBlockDownload, pindexHeader); |
| 3924 | } |
| 3925 | } |
| 3926 | |
| 3927 | /** |
| 3928 | * Make the best chain active, in multiple steps. The result is either failure |
no test coverage detected