pub async fn select_nodes(
chain: &ChainConfig,
site: &PullSite,
discovery: &DiscoveryOptions,
) -> Result<NodeSelection>Expand description
Resolve where a pull’s entries find their holders, once for the run.
With a pinned node every entry pulls from it. Otherwise the run’s
candidate list is every active registered node: the peer store’s
identity-fresh records when enough of them qualify, else one
CapacityBond registry read bounded by
DiscoveryOptions::registry_timeout. Each entry then probes its own
sample of the list. Resolve the selection before you unlock a key, so a
failed discovery costs no password prompt.
§Errors
No node is pinned and chain names no CapacityBond, or the registry
read fails with no usable peer store, or the registry lists no node.