From 43f421d0b60723b5aee13095d38edc3781f8bc15 Mon Sep 17 00:00:00 2001 From: Matthias Seitz Date: Thu, 1 Jun 2023 18:29:59 +0200 Subject: [PATCH] fix: set reputation change for already seen txs to 0 (#2945) --- crates/net/network/src/peers/reputation.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/net/network/src/peers/reputation.rs b/crates/net/network/src/peers/reputation.rs index 7ce057a8bc..32f8db9d4c 100644 --- a/crates/net/network/src/peers/reputation.rs +++ b/crates/net/network/src/peers/reputation.rs @@ -26,9 +26,9 @@ const BAD_MESSAGE_REPUTATION_CHANGE: i32 = 16 * REPUTATION_UNIT; /// The reputation change applies to a peer that has sent a transaction (full or hash) that we /// already know about and have already previously received from that peer. /// -/// Note: We weight this very low because it is generally not a problem to get a transaction that we -/// already know about, so only spammers are affected. -const ALREADY_SEEN_TRANSACTION_REPUTATION_CHANGE: i32 = REPUTATION_UNIT / 2; +/// Note: this appears to be quite common in practice, so by default this is 0, which doesn't +/// apply any changes to the peer's reputation, effectively ignoring it. +const ALREADY_SEEN_TRANSACTION_REPUTATION_CHANGE: i32 = 0; /// The reputation change to apply to a peer which violates protocol rules: minimal reputation const BAD_PROTOCOL_REPUTATION_CHANGE: i32 = i32::MIN;