Split off from #26711 (suggested in #26711 (comment)). This is part of #27463.
- Add 2 new TxValidationResults
TX_RECONSIDERABLE
helps us encode transactions who have failed fee checks that can be bypassed using package validation. This is distinguished fromTX_MEMPOOL_POLICY
so that we re-validate a transaction if and only if it is eligible for package CPFP. In the future, we will have a separate cache for reconsiderable rejects so these transactions don’t go inm_recent_rejects
.TX_UNKNOWN
helps us communicate that we aborted package validation and didn’t finish looking at this transaction: it’s not valid but it’s also not invalid (i.e. don’t cache it as a rejected tx)
- Return effective feerate and the wtxids of transactions used to calculate that effective feerate when the error is
TX_SINGLE_FAILURE
. Previously, we would only provide this information if the transaction passed. Now that we have package validation, it’s much more helpful to the caller to know how the failing feerate was calculated. This can also be used to improve our submitpackage RPC result (which is currently a bit unhelpful when things fail). - Use the newly added
CheckPackageMempoolAcceptResult
for existing package validation tests. This increases test coverage and helps test the changes made in this PR.