mirror of
https://github.com/logos-messaging/go-libp2p-pubsub.git
synced 2026-06-06 15:49:32 +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)
|
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 {
|
if total == 0 {
|
||||||
return AcceptAll
|
return AcceptAll
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user