mirror of
https://github.com/bitcoin/bitcoin.git
synced 2024-11-20 10:38:42 +01:00
Use pindexBestHeader instead of setBlockIndexCandidates for NotifyHeaderTip()
This commit is contained in:
parent
f2d705629b
commit
0a261b63fd
@ -3006,9 +3006,8 @@ static void NotifyHeaderTip() {
|
|||||||
CBlockIndex* pindexHeader = NULL;
|
CBlockIndex* pindexHeader = NULL;
|
||||||
{
|
{
|
||||||
LOCK(cs_main);
|
LOCK(cs_main);
|
||||||
if (!setBlockIndexCandidates.empty()) {
|
pindexHeader = pindexBestHeader;
|
||||||
pindexHeader = *setBlockIndexCandidates.rbegin();
|
|
||||||
}
|
|
||||||
if (pindexHeader != pindexHeaderOld) {
|
if (pindexHeader != pindexHeaderOld) {
|
||||||
fNotify = true;
|
fNotify = true;
|
||||||
fInitialBlockDownload = IsInitialBlockDownload();
|
fInitialBlockDownload = IsInitialBlockDownload();
|
||||||
|
Loading…
Reference in New Issue
Block a user