Emit HashrateNotification for miner's total hashrate
@@ -197,6 +197,7 @@ namespace Miningcore.Mining
await cf.RunTx(async (con, tx) =>
{
stats.Miner = minerHashes.Key;
+ double minerTotalHashrate = 0;
foreach(var item in minerHashes)
{
@@ -206,6 +207,7 @@ namespace Miningcore.Mining
if (windowActual >= MinHashrateCalculationWindow)
{
var hashrate = pool.HashrateFromShares(item.Sum, windowActual) * HashrateBoostFactor;
+ minerTotalHashrate += hashrate;
// update
stats.Hashrate = hashrate;
@@ -218,6 +220,8 @@ namespace Miningcore.Mining
messageBus.NotifyHashrateUpdated(pool.Config.Id, hashrate, stats.Miner, item.Worker);
}
}
+
+ messageBus.NotifyHashrateUpdated(pool.Config.Id, minerTotalHashrate, stats.Miner, null);
});
}
}
