示例#1
0
        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));
        }
示例#2
0
 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));
 }
示例#3
0
 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));
 }