Every time we try to ProcessTransaction (i.e. submit a tx to mempool), we use the result to update a few net processing data structures. For example, after a failure, the {wtxid, txid, both, neither} (depending on reason) should be cached in m_recent_rejects so we don’t try to download/validate it again.
There are 2 current places and at least 1 future place where we need to process MempoolAcceptResult:
- In the
ProcessMessagelogic after receiving and validating a tx - In
ProcessOrphanTxwhere we retry orphans - With #28970, after processing a package of transactions, we should do these updates for each tx in the package.
Consolidate this code so it isn’t repeated in 2 places and so we can reuse it in a future PR.