Parallel pool startup
@@ -332,7 +332,9 @@ namespace Miningcore
.Select(config=> RunPool(config, coinTemplates, ct)));
}
- private async Task RunPool(PoolConfig poolConfig, Dictionary<string, CoinTemplate> coinTemplates, CancellationToken ct)
+ private Task RunPool(PoolConfig poolConfig, Dictionary<string, CoinTemplate> coinTemplates, CancellationToken ct)
+ {
+ return Task.Run(async () =>
{
// Lookup coin
if(!coinTemplates.TryGetValue(poolConfig.Coin, out var template))
@@ -349,7 +351,9 @@ namespace Miningcore
pool.Configure(poolConfig, clusterConfig);
pools[poolConfig.Id] = pool;
+ // go
await pool.RunAsync(ct);
+ }, ct);
}
private Task RecoverSharesAsync(string recoveryFilename)
