Tezos: library for a pool of P2P connections
Library tezos-p2p

add t addr adds addr to the address greylist.

val clear : t -> unit

clear t removes all address greylistings.

val gc : t -> unit

gc t removes some address greylistings (the oldest have a higher probability to be removed, yet due to the underlying probabilistic structure, recent greylistings can be dropped).

mem t addr tells if addr is greylisted, but may return a false positive due to the underlying probabilistic structure.

val fill_percentage : t -> float

fill_percentage t returns the percentage (in the 0,1 interval) of bloom filter cells which are nonzero.

val life_expectancy_histogram : t -> int array

life_expectancy_histogram t returns the life expectancy distribution of cells (measured in gc calls) stored as an array: the value at index k stores the number of cells that are k calls to gc away from being removed from the greylist.

list t if list_not_reliable_since t returns None, returns the list of currently greylisted IPs. Else it return the list of all ips greylisted since `list_not_reliable_since`

val list_not_reliable_since : t -> Tezos_base.TzPervasives.Time.System.t option