mix total accounting components with different weights

This commit is contained in:
vyzo 2020-09-03 10:24:00 +03:00
parent 6dbdaed793
commit 9f5b106a12

View File

@ -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
}