pub fn plan(
listed: &HashMap<PublicKey, Vec<RelayUrl>>,
home: &HashSet<RelayUrl>,
avoid: &HashSet<RelayUrl>,
per_person: usize,
cap: usize,
) -> Vec<(RelayUrl, Vec<PublicKey>)>Expand description
The relays to ask about the people in listed, beside the account’s
own, and whom to ask each about: a relay is asked about everyone who
lists it.
listed is, for each person, the relays their events are on. Each
person is to be had from per_person relays, of which those in home,
the account’s own, count: they are asked about everyone as it is. The
relay that helps the most people who are still short is taken first
(of several that help as many, the one more people list), then the
next, until nobody is short or cap relays are taken. A relay in
avoid is never taken.
The same people and lists always give the same relays, in the same order.