public static IHashRate ChangeTimeSpan(IHashRate a, IHashRate b) { // no parameter checking double normalizedTimeSpan = a.HashRateTimeSpan.Duration().Ticks / b.HashRateTimeSpan.Duration().Ticks; return(new HashRate(a.HashRatePerTimeSpan * (a.HashRateTimeSpan.Duration().Ticks / b.HashRateTimeSpan.Duration().Ticks), a.HashRateTimeSpan)); }
public AverageShareOfBlockRewardDT(TimeBlock averageBlockCreationSpan, double blockRewardPerBlock, TimeBlock duration, IHashRate minerHashRate, IHashRate networkHashRate) { AverageBlockCreationSpan = averageBlockCreationSpan ?? throw new ArgumentNullException(nameof(averageBlockCreationSpan)); BlockRewardPerBlock = blockRewardPerBlock; Duration = duration ?? throw new ArgumentNullException(nameof(duration)); MinerHashRate = minerHashRate ?? throw new ArgumentNullException(nameof(minerHashRate)); NetworkHashRate = networkHashRate ?? throw new ArgumentNullException(nameof(networkHashRate)); }
public CryptoCoinNetworkInfo(TimeBlock avgBlockTime, double blockRewardPerBlock, Coin coin, IHashRate hashRate) { AvgBlockTime = avgBlockTime ?? throw new ArgumentNullException(nameof(avgBlockTime)); BlockRewardPerBlock = blockRewardPerBlock; Coin = coin; HashRate = hashRate ?? throw new ArgumentNullException(nameof(hashRate)); }