tribler.core.tunnel.discovery
Classes
Strategy for removing peers once we have too many in the TunnelCommunity. |
Module Contents
- class tribler.core.tunnel.discovery.GoldenRatioStrategy(overlay: tribler.core.tunnel.community.TriblerTunnelCommunity, golden_ratio: float = 9 / 16, target_peers: int = 23)
Bases:
ipv8.peerdiscovery.discovery.DiscoveryStrategyStrategy for removing peers once we have too many in the TunnelCommunity.
This strategy will remove a “normal” peer if the current ratio of “normal” peers to exit node peers is larger than the set golden ratio. This strategy will remove an exit peer if the current ratio of “normal” peers to exit node peers is smaller than the set golden ratio.
- golden_ratio = 0.5625
- target_peers = 23