This is the first 4 commits of #20833, and does refactoring only. It should be relatively simple to review, and offers a few nice things:
- It makes accessing values that don’t make sense (e.g. fee) when the tx is invalid an error.
- Returning
MempoolAcceptResult
from ATMP makes the interface cleaner. The caller can get a const instead of passing in a mutable “out” param. - We don’t have to be iterating through a bunch of lists for package validation, we can just return a
std::vector<MempoolAcceptResult>
. - We don’t have to refactor all ATMP call sites again if/when we want to return more stuff from it.