Changeset View
Changeset View
Standalone View
Standalone View
src/net_processing.cpp
Show First 20 Lines • Show All 2,387 Lines • ▼ Show 20 Lines | else if (strCommand == NetMsgType::TX) { | ||||
bool fMissingInputs = false; | bool fMissingInputs = false; | ||||
CValidationState state; | CValidationState state; | ||||
pfrom->setAskFor.erase(inv.hash); | pfrom->setAskFor.erase(inv.hash); | ||||
mapAlreadyAskedFor.erase(inv.hash); | mapAlreadyAskedFor.erase(inv.hash); | ||||
if (!AlreadyHave(inv) && AcceptToMemoryPool(config, mempool, state, ptx, | if (!AlreadyHave(inv) && AcceptToMemoryPool(config, mempool, state, ptx, | ||||
true, &fMissingInputs)) { | true, &fMissingInputs)) { | ||||
mempool.check(pcoinsTip); | mempool.check(pcoinsTip.get()); | ||||
RelayTransaction(tx, connman); | RelayTransaction(tx, connman); | ||||
for (size_t i = 0; i < tx.vout.size(); i++) { | for (size_t i = 0; i < tx.vout.size(); i++) { | ||||
vWorkQueue.emplace_back(inv.hash, i); | vWorkQueue.emplace_back(inv.hash, i); | ||||
} | } | ||||
pfrom->nLastTXTime = GetTime(); | pfrom->nLastTXTime = GetTime(); | ||||
LogPrint(BCLog::MEMPOOL, "AcceptToMemoryPool: peer=%d: accepted %s " | LogPrint(BCLog::MEMPOOL, "AcceptToMemoryPool: peer=%d: accepted %s " | ||||
▲ Show 20 Lines • Show All 56 Lines • ▼ Show 20 Lines | else if (strCommand == NetMsgType::TX) { | ||||
// transactions or witness-stripped transactions, as | // transactions or witness-stripped transactions, as | ||||
// they can have been malleated. See | // they can have been malleated. See | ||||
// https://github.com/bitcoin/bitcoin/issues/8279 | // https://github.com/bitcoin/bitcoin/issues/8279 | ||||
// for details. | // for details. | ||||
assert(recentRejects); | assert(recentRejects); | ||||
recentRejects->insert(orphanId); | recentRejects->insert(orphanId); | ||||
} | } | ||||
} | } | ||||
mempool.check(pcoinsTip); | mempool.check(pcoinsTip.get()); | ||||
} | } | ||||
} | } | ||||
for (const uint256 &hash : vEraseQueue) { | for (const uint256 &hash : vEraseQueue) { | ||||
EraseOrphanTx(hash); | EraseOrphanTx(hash); | ||||
} | } | ||||
} else if (fMissingInputs) { | } else if (fMissingInputs) { | ||||
// It may be the case that the orphans parents have all been | // It may be the case that the orphans parents have all been | ||||
▲ Show 20 Lines • Show All 1,745 Lines • Show Last 20 Lines |