MCPcopy Create free account
hub / github.com/bitcoin/bitcoin / ProcessValidTx

Method ProcessValidTx

src/net_processing.cpp:3177–3196  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3175}
3176
3177void PeerManagerImpl::ProcessValidTx(NodeId nodeid, const CTransactionRef& tx, const std::list<CTransactionRef>& replaced_transactions)
3178{
3179 AssertLockNotHeld(m_peer_mutex);
3180 AssertLockHeld(g_msgproc_mutex);
3181 AssertLockHeld(m_tx_download_mutex);
3182
3183 m_txdownloadman.MempoolAcceptedTx(tx);
3184
3185 LogDebug(BCLog::MEMPOOL, "AcceptToMemoryPool: peer=%d: accepted %s (wtxid=%s) (poolsz %u txn, %u kB)\n",
3186 nodeid,
3187 tx->GetHash().ToString(),
3188 tx->GetWitnessHash().ToString(),
3189 m_mempool.size(), m_mempool.DynamicMemoryUsage() / 1000);
3190
3191 InitiateTxBroadcastToAll(tx->GetHash(), tx->GetWitnessHash());
3192
3193 for (const CTransactionRef& removedTx : replaced_transactions) {
3194 AddToCompactExtraTransactions(removedTx);
3195 }
3196}
3197
3198void PeerManagerImpl::ProcessPackageResult(const node::PackageToValidate& package_to_validate, const PackageMempoolAcceptResult& package_result)
3199{

Callers

nothing calls this directly

Calls 5

MempoolAcceptedTxMethod · 0.80
ToStringMethod · 0.45
GetHashMethod · 0.45
sizeMethod · 0.45
DynamicMemoryUsageMethod · 0.45

Tested by

no test coverage detected