Skip to content
This repository was archived by the owner on Oct 20, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/Miningcore/Blockchain/Abstractions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ public class BlockchainStats
public string NetworkType { get; set; }
public double NetworkHashrate { get; set; }
public double NetworkDifficulty { get; set; }
public string NextNetworkTarget { get; set; }
public string NextNetworkBits { get; set; }
public DateTime? LastNetworkBlockTime { get; set; }
public ulong BlockHeight { get; set; }
public int ConnectedPeers { get; set; }
Expand Down
2 changes: 2 additions & 0 deletions src/Miningcore/Blockchain/Bitcoin/BitcoinJobManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,8 @@ private BitcoinJob CreateJob()
BlockchainStats.LastNetworkBlockTime = clock.Now;
BlockchainStats.BlockHeight = blockTemplate.Height;
BlockchainStats.NetworkDifficulty = job.Difficulty;
BlockchainStats.NextNetworkTarget = blockTemplate.Target;
BlockchainStats.NextNetworkBits = blockTemplate.Bits;
}

else
Expand Down
2 changes: 2 additions & 0 deletions src/Miningcore/Blockchain/Cryptonote/CryptonoteJobManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,8 @@ protected async Task<bool> UpdateJob(string via = null, string json = null)
BlockchainStats.LastNetworkBlockTime = clock.Now;
BlockchainStats.BlockHeight = job.BlockTemplate.Height;
BlockchainStats.NetworkDifficulty = job.BlockTemplate.Difficulty;
BlockchainStats.NextNetworkTarget = "";
BlockchainStats.NextNetworkBits = "";
}

return isNew;
Expand Down
2 changes: 2 additions & 0 deletions src/Miningcore/Blockchain/Equihash/EquihashJobManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,8 @@ private EquihashJob CreateJob()
BlockchainStats.LastNetworkBlockTime = clock.Now;
BlockchainStats.BlockHeight = blockTemplate.Height;
BlockchainStats.NetworkDifficulty = job.Difficulty;
BlockchainStats.NextNetworkTarget = blockTemplate.Target;
BlockchainStats.NextNetworkBits = blockTemplate.Bits;
}

else
Expand Down
2 changes: 2 additions & 0 deletions src/Miningcore/Blockchain/Ethereum/EthereumJobManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,8 @@ protected bool UpdateJob(EthereumBlockTemplate blockTemplate)
BlockchainStats.LastNetworkBlockTime = clock.Now;
BlockchainStats.BlockHeight = job.BlockTemplate.Height;
BlockchainStats.NetworkDifficulty = job.BlockTemplate.Difficulty;
BlockchainStats.NextNetworkTarget = job.BlockTemplate.Target;
BlockchainStats.NextNetworkBits = "";
}

return isNew;
Expand Down