net_processing: drop MaybePunishNodeForTx

Do not discourage nodes even when they send us consensus invalid
transactions.

Because we do not discourage nodes for transactions we consider
non-standard, we don't get any DoS protection from this check in
adversarial scenarios, so remove the check entirely both to simplify the
code and reduce the risk of splitting the network due to changes in tx
relay policy.
This commit is contained in:
Anthony Towns committed 2025-08-09 04:45:51 +10:00
1 parent f679bad605
commit 266dd0e10d
4 files changed
+15 -48

No files matched your search

+4 -2
View File
@@ -274,8 +274,10 @@ class PackageRelayTest(BitcoinTestFramework):
assert tx_orphan_bad_wit.txid_hex not in node_mempool
# 5. Have the other peer send the tx too, so that tx_orphan_bad_wit package is attempted.
bad_orphan_sender.send_without_ping(msg_tx(low_fee_parent["tx"]))
bad_orphan_sender.wait_for_disconnect()
bad_orphan_sender.send_and_ping(msg_tx(low_fee_parent["tx"]))
# The bad orphan sender should not be disconnected.
bad_orphan_sender.sync_with_ping()
# The peer that didn't provide the orphan should not be disconnected.
parent_sender.sync_with_ping()