fn choose_account(
state: &AppState,
leader: &Leader,
provider: &str,
requested: Option<&str>,
) -> Result<WorkerAccount, SpawnError>Expand description
The account to run the worker on (§3.5): the one asked for, else the
leader’s, else, when the leader’s can’t run (account_blocks), the first
of the user’s other accounts for the provider that can, with a note
saying why. Refused when the one asked for can’t run, or none can.