public async Task <RelayCollection> GetAsync(string hubAddress, IRelayPriorityPolicy policy) { var relays = await GetRelaysFromEvents(hubAddress).ConfigureAwait(false); if (relays.Count == 0) { throw new GSNNoRegisteredRelaysException(hubAddress); } // TODO: filter relays by minDelay and minStake return(new RelayCollection(_relayClient, policy.Execute(relays))); }
public async Task <RelayCollection> GetRelaysAsync(string hubAddress, IRelayPriorityPolicy policy) { var relays = await GetRelaysFromEvents(hubAddress); if (relays.Count == 0) { throw new Exception($"No relayers registered in the requested hub at {hubAddress}"); } // TODO: filter relays by minDelay and minStake return(new RelayCollection(_relayClient, policy.Execute(relays))); }
public Task <RelayCollection> GetRelaysAsync(string hubAddress, IRelayPriorityPolicy policy) { return(_relayQuery.GetAsync(hubAddress, policy)); }