From 9f5b106a121eb7a70ed7e35e7b8f08ea3682dd4d Mon Sep 17 00:00:00 2001 From: vyzo Date: Thu, 3 Sep 2020 10:24:00 +0300 Subject: [PATCH] mix total accounting components with different weights --- peer_gater.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/peer_gater.go b/peer_gater.go index 430978af..5f5b417f 100644 --- a/peer_gater.go +++ b/peer_gater.go @@ -159,7 +159,7 @@ func (pg *peerGater) AcceptFrom(p peer.ID) AcceptStatus { st := pg.getPeerStats(p) - total := st.deliver + st.duplicate + st.ignore + st.reject + total := st.deliver + 0.5*st.duplicate + st.ignore + 2*st.reject if total == 0 { return AcceptAll }