File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -99,11 +99,13 @@ ReadStatus PartiallyDownloadedBlock::InitData(const CBlockHeaderAndShortTxIDs& c
9999
100100 std::vector<bool > have_txn (txn_available.size ());
101101 LOCK (pool->cs );
102- for (CTxMemPool::txiter it = pool->mapTx .begin (); it != pool->mapTx .end (); it++) {
103- std::unordered_map<uint64_t , uint16_t >::iterator idit = shorttxids.find (cmpctblock.GetShortID (it->GetTx ().GetHash ()));
102+ const std::vector<std::pair<uint256, CTxMemPool::txiter> >& vTxHashes = pool->vTxHashes ;
103+ for (size_t i = 0 ; i < vTxHashes.size (); i++) {
104+ uint64_t shortid = cmpctblock.GetShortID (vTxHashes[i].first );
105+ std::unordered_map<uint64_t , uint16_t >::iterator idit = shorttxids.find (shortid);
104106 if (idit != shorttxids.end ()) {
105107 if (!have_txn[idit->second ]) {
106- txn_available[idit->second ] = it ->GetSharedTx ();
108+ txn_available[idit->second ] = vTxHashes[i]. second ->GetSharedTx ();
107109 have_txn[idit->second ] = true ;
108110 mempool_count++;
109111 } else {
You can’t perform that action at this time.
0 commit comments