| 3148 | } |
| 3149 | |
| 3150 | std::optional<node::PackageToValidate> PeerManagerImpl::ProcessInvalidTx(NodeId nodeid, const CTransactionRef& ptx, const TxValidationState& state, |
| 3151 | bool first_time_failure) |
| 3152 | { |
| 3153 | AssertLockNotHeld(m_peer_mutex); |
| 3154 | AssertLockHeld(g_msgproc_mutex); |
| 3155 | AssertLockHeld(m_tx_download_mutex); |
| 3156 | |
| 3157 | PeerRef peer{GetPeerRef(nodeid)}; |
| 3158 | |
| 3159 | LogDebug(BCLog::MEMPOOLREJ, "%s (wtxid=%s) from peer=%d was not accepted: %s\n", |
| 3160 | ptx->GetHash().ToString(), |
| 3161 | ptx->GetWitnessHash().ToString(), |
| 3162 | nodeid, |
| 3163 | state.ToString()); |
| 3164 | |
| 3165 | const auto& [add_extra_compact_tx, unique_parents, package_to_validate] = m_txdownloadman.MempoolRejectedTx(ptx, state, nodeid, first_time_failure); |
| 3166 | |
| 3167 | if (add_extra_compact_tx && RecursiveDynamicUsage(*ptx) < 100000) { |
| 3168 | AddToCompactExtraTransactions(ptx); |
| 3169 | } |
| 3170 | for (const Txid& parent_txid : unique_parents) { |
| 3171 | if (peer) AddKnownTx(*peer, parent_txid.ToUint256()); |
| 3172 | } |
| 3173 | |
| 3174 | return package_to_validate; |
| 3175 | } |
| 3176 | |
| 3177 | void PeerManagerImpl::ProcessValidTx(NodeId nodeid, const CTransactionRef& tx, const std::list<CTransactionRef>& replaced_transactions) |
| 3178 | { |
nothing calls this directly
no test coverage detected