@@ -1296,28 +1296,30 @@ void PeerManager::UpdatedBlockTip(const CBlockIndex *pindexNew, const CBlockInde
1296
1296
m_connman.SetBestHeight (pindexNew->nHeight );
1297
1297
SetServiceFlagsIBDCache (!fInitialDownload );
1298
1298
1299
- // Relay inventory, but don 't relay old inventory during initial block download.
1300
- if (! fInitialDownload ) {
1301
- // Find the hashes of all blocks that weren't previously in the best chain.
1302
- std::vector<uint256> vHashes;
1303
- const CBlockIndex *pindexToAnnounce = pindexNew ;
1304
- while ( pindexToAnnounce != pindexFork) {
1305
- vHashes. push_back (pindexToAnnounce-> GetBlockHash ());
1306
- pindexToAnnounce = pindexToAnnounce-> pprev ;
1307
- if (vHashes. size () == MAX_BLOCKS_TO_ANNOUNCE) {
1308
- // Limit announcements in case of a huge reorganization.
1309
- // Rely on the peer's synchronization mechanism in that case .
1310
- break ;
1311
- }
1299
+ // Don 't relay inventory during initial block download.
1300
+ if (fInitialDownload ) return ;
1301
+
1302
+ // Find the hashes of all blocks that weren't previously in the best chain.
1303
+ std::vector<uint256> vHashes ;
1304
+ const CBlockIndex * pindexToAnnounce = pindexNew;
1305
+ while (pindexToAnnounce != pindexFork) {
1306
+ vHashes. push_back ( pindexToAnnounce-> GetBlockHash ()) ;
1307
+ pindexToAnnounce = pindexToAnnounce-> pprev ;
1308
+ if (vHashes. size () == MAX_BLOCKS_TO_ANNOUNCE) {
1309
+ // Limit announcements in case of a huge reorganization .
1310
+ // Rely on the peer's synchronization mechanism in that case.
1311
+ break ;
1312
1312
}
1313
- m_connman.ForEachNode ([&vHashes](CNode* pnode) {
1314
- LOCK (pnode->cs_inventory );
1315
- for (const uint256& hash : reverse_iterate (vHashes)) {
1316
- pnode->vBlockHashesToAnnounce .push_back (hash);
1317
- }
1318
- });
1319
- m_connman.WakeMessageHandler ();
1320
1313
}
1314
+
1315
+ // Relay to all peers
1316
+ m_connman.ForEachNode ([&vHashes](CNode* pnode) {
1317
+ LOCK (pnode->cs_inventory );
1318
+ for (const uint256& hash : reverse_iterate (vHashes)) {
1319
+ pnode->vBlockHashesToAnnounce .push_back (hash);
1320
+ }
1321
+ });
1322
+ m_connman.WakeMessageHandler ();
1321
1323
}
1322
1324
1323
1325
/* *
0 commit comments