Пример #1
0
        public static double CalculateCoinRevenuePerDay(double hashrateMega, double networkDifficultyMega, double blockReward, RevenueCalcMethod revenueCalcMethod = RevenueCalcMethod.Method1, double blockTimeInSeconds = 0)
        {
            switch (revenueCalcMethod)
            {
            case RevenueCalcMethod.Method1:
                return(CalculateCoinRevenuePerDayMethod1(hashrateMega, networkDifficultyMega, blockReward));

            case RevenueCalcMethod.Method2:
                return(CalculateCoinRevenuePerDayMethod2(hashrateMega, networkDifficultyMega, blockReward));

            case RevenueCalcMethod.Method3:
                return(CalculateCoinRevenuePerDayMethod3(hashrateMega, networkDifficultyMega, blockReward, blockTimeInSeconds));

            case RevenueCalcMethod.Method4:
                return(CalculateCoinRevenuePerDayMethod4(hashrateMega, networkDifficultyMega, blockReward));

            case RevenueCalcMethod.Method5:
                return(CalculateCoinRevenuePerDayMethod5(hashrateMega, networkDifficultyMega, blockReward));
            }
            throw new Exception(" out of switch");
        }
Пример #2
0
 public static double CalculateCoinRevenuePerDayBtcEchangeRate(double hashrateMega, double networkDifficultyMega, double blockReward, double singleCoinBtcPrice, RevenueCalcMethod revenueCalcMethod = RevenueCalcMethod.Method1, double blockTimeInSeconds = 0)
 {
     return(CalculateCoinRevenuePerDay(hashrateMega, networkDifficultyMega, blockReward, revenueCalcMethod, blockTimeInSeconds) * singleCoinBtcPrice);
 }