From de27546cf909ddfe2d979be4a9f7f3a170c65db1 Mon Sep 17 00:00:00 2001 From: Matthias Seitz Date: Tue, 28 Mar 2023 19:49:44 +0200 Subject: [PATCH] fix: disable penalization until we got it right (#2016) --- crates/net/network/src/transactions.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/crates/net/network/src/transactions.rs b/crates/net/network/src/transactions.rs index dd8548bee4..438fc436bd 100644 --- a/crates/net/network/src/transactions.rs +++ b/crates/net/network/src/transactions.rs @@ -461,6 +461,7 @@ where } /// Penalize the peers that sent the bad transaction + #[allow(unused)] fn on_bad_import(&mut self, hash: TxHash) { if let Some(peers) = self.transactions_by_peers.remove(&hash) { for peer_id in peers { @@ -526,7 +527,10 @@ where } Err(err) => { if err.is_bad_transaction() { - this.on_bad_import(*err.hash()); + trace!(target: "net::tx", ?err, "Bad transaction import"); + // TODO disabled until properly tested + // this.on_bad_import(*err.hash()); + this.on_good_import(*err.hash()); } else { this.on_good_import(*err.hash()); }