Changeset View
Changeset View
Standalone View
Standalone View
src/blockencodings.cpp
Show First 20 Lines • Show All 110 Lines • ▼ Show 20 Lines | ReadStatus PartiallyDownloadedBlock::InitData( | ||||
if (shorttxids.size() != cmpctblock.shorttxids.size()) { | if (shorttxids.size() != cmpctblock.shorttxids.size()) { | ||||
// Short ID collision | // Short ID collision | ||||
return READ_STATUS_FAILED; | return READ_STATUS_FAILED; | ||||
} | } | ||||
std::vector<bool> have_txn(txn_available.size()); | std::vector<bool> have_txn(txn_available.size()); | ||||
{ | { | ||||
LOCK(pool->cs); | LOCK(pool->cs); | ||||
const std::vector<std::pair<uint256, CTxMemPool::txiter>> &vTxHashes = | const std::vector<std::pair<TxHash, CTxMemPool::txiter>> &vTxHashes = | ||||
pool->vTxHashes; | pool->vTxHashes; | ||||
for (size_t i = 0; i < vTxHashes.size(); i++) { | for (size_t i = 0; i < vTxHashes.size(); i++) { | ||||
uint64_t shortid = cmpctblock.GetShortID(vTxHashes[i].first); | uint64_t shortid = cmpctblock.GetShortID(vTxHashes[i].first); | ||||
std::unordered_map<uint64_t, uint16_t>::iterator idit = | std::unordered_map<uint64_t, uint16_t>::iterator idit = | ||||
shorttxids.find(shortid); | shorttxids.find(shortid); | ||||
if (idit != shorttxids.end()) { | if (idit != shorttxids.end()) { | ||||
if (!have_txn[idit->second]) { | if (!have_txn[idit->second]) { | ||||
txn_available[idit->second] = | txn_available[idit->second] = | ||||
▲ Show 20 Lines • Show All 117 Lines • Show Last 20 Lines |