Changeset View
Changeset View
Standalone View
Standalone View
src/net_processing.cpp
Show First 20 Lines • Show All 2,557 Lines • ▼ Show 20 Lines | if (strCommand == NetMsgType::TX) { | ||||
return true; | return true; | ||||
} | } | ||||
std::deque<COutPoint> vWorkQueue; | std::deque<COutPoint> vWorkQueue; | ||||
std::vector<uint256> vEraseQueue; | std::vector<uint256> vEraseQueue; | ||||
CTransactionRef ptx; | CTransactionRef ptx; | ||||
vRecv >> ptx; | vRecv >> ptx; | ||||
const CTransaction &tx = *ptx; | const CTransaction &tx = *ptx; | ||||
const TxId &txid = tx.GetId(); | |||||
CInv inv(MSG_TX, tx.GetId()); | CInv inv(MSG_TX, txid); | ||||
pfrom->AddInventoryKnown(inv); | pfrom->AddInventoryKnown(inv); | ||||
LOCK2(cs_main, g_cs_orphans); | LOCK2(cs_main, g_cs_orphans); | ||||
bool fMissingInputs = false; | bool fMissingInputs = false; | ||||
CValidationState state; | CValidationState state; | ||||
const TxId txid(inv.hash); | |||||
pfrom->setAskFor.erase(txid); | pfrom->setAskFor.erase(txid); | ||||
mapAlreadyAskedFor.erase(txid); | mapAlreadyAskedFor.erase(txid); | ||||
if (!AlreadyHave(inv) && | if (!AlreadyHave(inv) && | ||||
AcceptToMemoryPool(config, g_mempool, state, ptx, true, | AcceptToMemoryPool(config, g_mempool, state, ptx, true, | ||||
&fMissingInputs)) { | &fMissingInputs)) { | ||||
g_mempool.check(pcoinsTip.get()); | g_mempool.check(pcoinsTip.get()); | ||||
RelayTransaction(tx, connman); | RelayTransaction(tx, connman); | ||||
▲ Show 20 Lines • Show All 1,895 Lines • Show Last 20 Lines |