| 4327 | } |
| 4328 | |
| 4329 | void PeerManagerImpl::ProcessValidTx(NodeId nodeid, const CTransactionRef &tx) { |
| 4330 | AssertLockNotHeld(m_peer_mutex); |
| 4331 | AssertLockHeld(g_msgproc_mutex); |
| 4332 | AssertLockHeld(cs_main); |
| 4333 | |
| 4334 | // As this version of the transaction was acceptable, we can forget about |
| 4335 | // any requests for it. No-op if the tx is not in txrequest. |
| 4336 | m_txrequest.ForgetInvId(tx->GetId()); |
| 4337 | |
| 4338 | m_mempool.withOrphanage([&tx](TxOrphanage &orphanage) { |
| 4339 | orphanage.AddChildrenToWorkSet(*tx); |
| 4340 | // If it came from the orphanage, remove it. No-op if the tx is not in |
| 4341 | // txorphanage. |
| 4342 | orphanage.EraseTx(tx->GetId()); |
| 4343 | }); |
| 4344 | |
| 4345 | LogPrint( |
| 4346 | BCLog::MEMPOOL, |
| 4347 | "AcceptToMemoryPool: peer=%d: accepted %s (poolsz %u txn, %u kB)\n", |
| 4348 | nodeid, tx->GetId().ToString(), m_mempool.size(), |
| 4349 | m_mempool.DynamicMemoryUsage() / 1000); |
| 4350 | |
| 4351 | RelayTransaction(tx->GetId()); |
| 4352 | } |
| 4353 | |
| 4354 | void PeerManagerImpl::ProcessPackageResult( |
| 4355 | const PackageToValidate &package_to_validate, |
nothing calls this directly
no test coverage detected