Skip to content
This repository has been archived by the owner on Oct 20, 2023. It is now read-only.

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
Oliver Weichhold committed Nov 21, 2021
1 parent c7fa15f commit 1ea42f6
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/Miningcore/Blockchain/Ergo/ErgoJobManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -137,11 +137,7 @@ await GetBlockTemplateAsync() :
logger.Info(() => $"Detected new block {job.Height} [{via}]");
else
logger.Info(() => $"Detected new block {job.Height}");
// update stats
var inode = await Guard(() => ergoClient.GetNodeInfoAsync(),
ex => logger.Debug(ex));
var blockTimeAvg = 120;
var DiffN = (double)inode.Difficulty;

// update stats
var inode = await Guard(() => ergoClient.GetNodeInfoAsync(),
ex => logger.Debug(ex));
Expand All @@ -154,7 +150,6 @@ await GetBlockTemplateAsync() :
BlockchainStats.ConnectedPeers = inode.PeersCount;
BlockchainStats.NetworkDifficulty = DiffN;
BlockchainStats.NetworkHashrate = BlockchainStats.NetworkDifficulty / blockTimeAvg;

}

else
Expand Down

0 comments on commit 1ea42f6

Please sign in to comment.