mirror of
https://github.com/logos-messaging/go-libp2p-pubsub.git
synced 2026-01-11 09:13:12 +00:00
mix total accounting components with different weights
This commit is contained in:
parent
6dbdaed793
commit
9f5b106a12
@ -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
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user