Constant zebra_network::peer_set::inventory_registry::MAX_PEERS_PER_INV
source · pub const MAX_PEERS_PER_INV: usize = 70;
Expand description
The maximum number of peers we will track inventory for.
§Security
This limits known memory denial of service attacks. See MAX_INV_PER_MAP
for details.
Since the inventory registry is an efficiency optimisation, which falls back to a random peer, we only need to track a small number of peers per inv for available inventory.
But we want to be able to track missing inventory for almost all our peers, so we only query a few peers for inventory that is genuinely missing from the network.