You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if (pa->nSequenceId < pb->nSequenceId) returnfalse;
86
-
if (pa->nSequenceId > pb->nSequenceId) returntrue;
84
+
// ... then by earliest time received, ...
85
+
if (pa->nSequenceId < pb->nSequenceId) returnfalse;
86
+
if (pa->nSequenceId > pb->nSequenceId) returntrue;
87
87
88
-
// Use pointer address as tie breaker (should only happen with blocks
89
-
// loaded from disk, as those all have id 0).
90
-
if (pa < pb) returnfalse;
91
-
if (pa > pb) returntrue;
88
+
// Use pointer address as tie breaker (should only happen with blocks
89
+
// loaded from disk, as those all have id 0).
90
+
if (pa < pb) returnfalse;
91
+
if (pa > pb) returntrue;
92
92
93
-
// Identical blocks.
94
-
returnfalse;
95
-
}
96
-
};
97
-
98
-
CBlockIndex *pindexBestInvalid;
99
-
set<CBlockIndex*, CBlockIndexWorkComparator> setBlockIndexValid; // may contain all CBlockIndex*'s that have validness >=BLOCK_VALID_TRANSACTIONS, and must contain those who aren't failed
100
-
101
-
CCriticalSection cs_LastBlockFile;
102
-
CBlockFileInfo infoLastBlockFile;
103
-
int nLastBlockFile = 0;
104
-
105
-
// Every received block is assigned a unique and increasing identifier, so we
106
-
// know which one to give priority in case of a fork.
107
-
CCriticalSection cs_nBlockSequenceId;
108
-
// Blocks loaded from disk are assigned id 0, so start the counter at 1.
109
-
uint32_t nBlockSequenceId = 1;
110
-
111
-
// Sources of received blocks, to be able to send them reject messages or ban
112
-
// them, if processing happens afterwards. Protected by cs_main.
113
-
map<uint256, NodeId> mapBlockSource;
114
-
115
-
// Blocks that are in flight, and that are in the queue to be downloaded.
116
-
// Protected by cs_main.
117
-
structQueuedBlock {
118
-
uint256 hash;
119
-
int64_t nTime; // Time of "getdata" request in microseconds.
120
-
int nQueuedBefore; // Number of blocks in flight at the time of request.
0 commit comments