diff options
author | glozow <gloriajzhao@gmail.com> | 2022-09-12 10:43:33 +0100 |
---|---|---|
committer | glozow <gloriajzhao@gmail.com> | 2023-11-06 14:41:56 +0000 |
commit | 3979f1afcbef5fdd3fad56312573a6733a7d78a4 (patch) | |
tree | 1f39c9d8c5268248980c5cb408e481416114878e /src/consensus | |
parent | 5c786a026aee434363ad54f4346211d0e2c5a38d (diff) |
[validation] add TxValidationResult::TX_RECONSIDERABLE, TX_UNKNOWN
With package validation rules, transactions that fail individually may
sometimes be eligible for reconsideration if submitted as part of a
(different) package. For now, that includes trasactions that failed for
being too low feerate. Add a new TxValidationResult type to distinguish
these failures from others. In the next commits, we will abort package
validation if a tx fails for any other reason. In the future, we will
also decide whether to cache failures in recent_rejects based on this
result (we won't want to reject a package containing a transaction that
was rejected previously for being low feerate).
Package validation also sometimes elects to skip some transactions when
it knows the package will not be submitted in order to quit sooner. Add
a result to specify this situation; we also don't want to cache these
as rejections.
Diffstat (limited to 'src/consensus')
-rw-r--r-- | src/consensus/validation.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/consensus/validation.h b/src/consensus/validation.h index d5bf08cd61..bd3a5913c3 100644 --- a/src/consensus/validation.h +++ b/src/consensus/validation.h @@ -54,6 +54,8 @@ enum class TxValidationResult { TX_CONFLICT, TX_MEMPOOL_POLICY, //!< violated mempool's fee/size/descendant/RBF/etc limits TX_NO_MEMPOOL, //!< this node does not have a mempool so can't validate the transaction + TX_RECONSIDERABLE, //!< fails some policy, but might be acceptable if submitted in a (different) package + TX_UNKNOWN, //!< transaction was not validated because package failed }; /** A "reason" why a block was invalid, suitable for determining whether the |