// Use pointer address as tie breaker (should only happen with blocks
// loaded from disk, as those all have id 0).
if(pa<pb)returnfalse;
if(pa>pb)returntrue;
// Use pointer address as tie breaker (should only happen with blocks
// loaded from disk, as those all have id 0).
if(pa<pb)returnfalse;
if(pa>pb)returntrue;
// Identical blocks.
returnfalse;
}
};
CBlockIndex*pindexBestInvalid;
set<CBlockIndex*,CBlockIndexWorkComparator>setBlockIndexValid;// may contain all CBlockIndex*'s that have validness >=BLOCK_VALID_TRANSACTIONS, and must contain those who aren't failed
CCriticalSectioncs_LastBlockFile;
CBlockFileInfoinfoLastBlockFile;
intnLastBlockFile=0;
// Every received block is assigned a unique and increasing identifier, so we
// know which one to give priority in case of a fork.
CCriticalSectioncs_nBlockSequenceId;
// Blocks loaded from disk are assigned id 0, so start the counter at 1.
uint32_tnBlockSequenceId=1;
// Sources of received blocks, to be able to send them reject messages or ban
// them, if processing happens afterwards. Protected by cs_main.
map<uint256,NodeId>mapBlockSource;
// Blocks that are in flight, and that are in the queue to be downloaded.
// Protected by cs_main.
structQueuedBlock{
uint256hash;
int64_tnTime;// Time of "getdata" request in microseconds.
intnQueuedBefore;// Number of blocks in flight at the time of request.