aboutsummaryrefslogtreecommitdiff
path: root/src/net_processing.cpp
diff options
context:
space:
mode:
authorglozow <gloriajzhao@gmail.com>2022-09-12 10:43:33 +0100
committerglozow <gloriajzhao@gmail.com>2023-11-06 14:41:56 +0000
commit3979f1afcbef5fdd3fad56312573a6733a7d78a4 (patch)
tree1f39c9d8c5268248980c5cb408e481416114878e /src/net_processing.cpp
parent5c786a026aee434363ad54f4346211d0e2c5a38d (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/net_processing.cpp')
-rw-r--r--src/net_processing.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/net_processing.cpp b/src/net_processing.cpp
index 2f41eb2b1d..c9596a36b8 100644
--- a/src/net_processing.cpp
+++ b/src/net_processing.cpp
@@ -1820,6 +1820,8 @@ bool PeerManagerImpl::MaybePunishNodeForTx(NodeId nodeid, const TxValidationStat
case TxValidationResult::TX_CONFLICT:
case TxValidationResult::TX_MEMPOOL_POLICY:
case TxValidationResult::TX_NO_MEMPOOL:
+ case TxValidationResult::TX_RECONSIDERABLE:
+ case TxValidationResult::TX_UNKNOWN:
break;
}
return false;