Changeset View
Changeset View
Standalone View
Standalone View
src/blockencodings.cpp
Show First 20 Lines • Show All 170 Lines • ▼ Show 20 Lines | for (auto &extra_txn : extra_txns) { | ||||
txns_available[idit->second] = extra_txn.second; | txns_available[idit->second] = extra_txn.second; | ||||
have_txn[idit->second] = true; | have_txn[idit->second] = true; | ||||
mempool_count++; | mempool_count++; | ||||
extra_count++; | extra_count++; | ||||
} else { | } else { | ||||
// If we find two mempool/extra txn that match the short id, | // If we find two mempool/extra txn that match the short id, | ||||
// just request it. This should be rare enough that the extra | // just request it. This should be rare enough that the extra | ||||
// bandwidth doesn't matter, but eating a round-trip due to | // bandwidth doesn't matter, but eating a round-trip due to | ||||
// FillBlock failure would be annoying. Note that we dont want | // FillBlock failure would be annoying. Note that we don't want | ||||
// duplication between extra_txns and mempool to trigger this | // duplication between extra_txns and mempool to trigger this | ||||
// case, so we compare hashes first. | // case, so we compare hashes first. | ||||
if (txns_available[idit->second] && | if (txns_available[idit->second] && | ||||
txns_available[idit->second]->GetHash() != | txns_available[idit->second]->GetHash() != | ||||
extra_txn.second->GetHash()) { | extra_txn.second->GetHash()) { | ||||
txns_available[idit->second].reset(); | txns_available[idit->second].reset(); | ||||
mempool_count--; | mempool_count--; | ||||
extra_count--; | extra_count--; | ||||
▲ Show 20 Lines • Show All 84 Lines • Show Last 20 Lines |