Skip to content

Commit

Permalink
mix total accounting components with different weights
Browse files Browse the repository at this point in the history
  • Loading branch information
vyzo committed Sep 7, 2020
1 parent 6dbdaed commit 9f5b106
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion peer_gater.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 9f5b106

Please sign in to comment.