Skip to content

Commit

Permalink
0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
angelbbs committed Nov 29, 2024
1 parent 2c77d98 commit c5c826d
Show file tree
Hide file tree
Showing 13 changed files with 66 additions and 33 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
[![GitHub release](https://img.shields.io/github/release/angelbbs/ZergPoolMinerLegacy/all.svg)](https://github.com/angelbbs/ZergPoolMinerLegacy/releases)
[![GitHub Release Date](https://img.shields.io/github/release-date/angelbbs/ZergPoolMinerLegacy.svg)](https://github.com/angelbbs/ZergPoolMinerLegacy/releases)

[![Github All Releases](https://img.shields.io/github/downloads/angelbbs/ZergPoolMinerLegacy/total.svg)]
[![Github All Releases](https://img.shields.io/github/downloads/angelbbs/ZergPoolMinerLegacy/total.svg)](https://github.com/angelbbs/ZergPoolMinerLegacy/releases)
## Download
* **[Binary releases](https://github.com/angelbbs/ZergPoolMinerLegacy/releases)**
* **[Download latest release](https://github.com/angelbbs/ZergPoolMinerLegacy/releases)**


"Miner Legacy Fork Fix" is an free open source easy to use CPU & GPU cryptocurrency miner program with classic GUI for Windows.
Expand Down
3 changes: 2 additions & 1 deletion ZergPoolMiner/Devices/Algorithms/DefaultAlgorithms.cs
Original file line number Diff line number Diff line change
Expand Up @@ -689,7 +689,8 @@ public static class DefaultAlgorithms
{ MinerBaseType.CryptoDredge,
new List<Algorithm>() {
new Algorithm(MinerBaseType.CryptoDredge, AlgorithmType.NeoScrypt, "NeoScrypt"),
new Algorithm(MinerBaseType.CryptoDredge, AlgorithmType.Cryptonight_GPU, "Cryptonight_GPU"),
//после переключения монет реджекты
//new Algorithm(MinerBaseType.CryptoDredge, AlgorithmType.Cryptonight_GPU, "Cryptonight_GPU"),
new Algorithm(MinerBaseType.CryptoDredge, AlgorithmType.SHA256csm, "SHA256csm"),
//new Algorithm(MinerBaseType.CryptoDredge, AlgorithmType.FiroPow, "FiroPow")
}
Expand Down
1 change: 1 addition & 0 deletions ZergPoolMiner/Forms/Form_Main.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions ZergPoolMiner/Forms/Form_Main.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3978,6 +3978,11 @@ private void Form_Main_Paint(object sender, PaintEventArgs e)
e.Graphics.DrawImage(shadowBmp, new Point(0, 0));
}
}

private void Form_Main_Activated(object sender, EventArgs e)
{
this.Width = ConfigManager.GeneralConfig.FormWidth;
}
}

static class TimeSpanExtensions
Expand Down
8 changes: 7 additions & 1 deletion ZergPoolMiner/Miners/CryptoDredge.cs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,13 @@ protected override void _Stop(MinerStopType willswitch)
{
Stop_cpu_ccminer_sgminer_nheqminer(willswitch);
Thread.Sleep(200);
try { ProcessHandle.SendCtrlC((uint)Process.GetCurrentProcess().Id); } catch { }
try {
if (ProcessHandle is object)
{
ProcessHandle.SendCtrlC((uint)Process.GetCurrentProcess().Id);
}
} catch
{ }
Thread.Sleep(200);
foreach (var process in Process.GetProcessesByName("CryptoDredge"))
{
Expand Down
24 changes: 17 additions & 7 deletions ZergPoolMiner/Miners/MiningSession.cs
Original file line number Diff line number Diff line change
Expand Up @@ -107,19 +107,13 @@ public MiningSession(List<ComputeDevice> devices,
_mainFormRatesComunication = mainFormRatesComunication;
// _miningLocation = miningLocation;
_switchingManager = new AlgorithmSwitchingManager();
if (!FuncAttached)
{
Helpers.ConsolePrint("MiningSession", "Process attached");
ZergPoolMiner.Switching.AlgorithmSwitchingManager.SmaCheck += SwichMostProfitableGroupUpMethod;
_miningDevices = GroupSetupUtils.GetMiningDevices(devices, true);

FuncAttached = true;
}
_btcAdress = btcAdress;
_payoutCurrency = payoutCurrency;
_worker = worker;

// initial settup
_miningDevices = GroupSetupUtils.GetMiningDevices(devices, true);
if (_miningDevices.Count > 0)
{
GroupSetupUtils.AvarageSpeeds(_miningDevices);
Expand All @@ -139,6 +133,22 @@ public MiningSession(List<ComputeDevice> devices,
_isProfitable = true;
// assume we have internet
_isConnectedToInternet = true;

if (!FuncAttached)
{
Helpers.ConsolePrint("MiningSession", "Process attached");
ZergPoolMiner.Switching.AlgorithmSwitchingManager.SmaCheck += SwichMostProfitableGroupUpMethod;
/*
if (_miningDevices.Count > 0)
{
SwichMostProfitableGroupUpMethod(null, null);
}
*/
//ZergPoolMiner.Switching.AlgorithmSwitchingManager.Stop();
//ZergPoolMiner.Switching.AlgorithmSwitchingManager.Start();
FuncAttached = true;
}

if (IsMiningEnabled)
{
_preventSleepTimer.Start();
Expand Down
32 changes: 19 additions & 13 deletions ZergPoolMiner/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -254,24 +254,30 @@ static void Main(string[] argv)
ConfigManager.GeneralConfig.ForkFixVersion = 0.1;
}
//0.2
try
if (Configs.ConfigManager.GeneralConfig.ForkFixVersion < 0.2)
{
if (File.Exists("configs\\wallets.json"))
ConfigManager.GeneralConfig.ServiceLocation = 0;
Helpers.ConsolePrint("MinerLegacy", "Previous version: " + Configs.ConfigManager.GeneralConfig.ForkFixVersion.ToString());
ConfigManager.GeneralConfig.ForkFixVersion = 0.2;
try
{
string json = File.ReadAllText("configs\\wallets.json");
WalletDataList = JsonConvert.DeserializeObject<List<WalletData>>(json);
foreach (var w in WalletDataList)
if (File.Exists("configs\\wallets.json"))
{
w.Treshold = 0;
string json = File.ReadAllText("configs\\wallets.json");
WalletDataList = JsonConvert.DeserializeObject<List<WalletData>>(json);
foreach (var w in WalletDataList)
{
w.Treshold = 0;
}
var _json = JsonConvert.SerializeObject(WalletDataList, Formatting.Indented);
Helpers.WriteAllTextWithBackup("configs\\wallets.json", _json);
}
var _json = JsonConvert.SerializeObject(WalletDataList, Formatting.Indented);
Helpers.WriteAllTextWithBackup("configs\\wallets.json", _json);
ConfigManager.GeneralConfig.PayoutCurrencyTreshold = 0;
}
catch (Exception ex)
{
Helpers.ConsolePrint("MinerLegacy", ex.ToString());
}
ConfigManager.GeneralConfig.PayoutCurrencyTreshold = 0;
}
catch (Exception ex)
{
Helpers.ConsolePrint("MinerLegacy", ex.ToString());
}


Expand Down
2 changes: 1 addition & 1 deletion ZergPoolMiner/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyFileVersion("0.1")]
[assembly: AssemblyFileVersion("0.2")]
11 changes: 6 additions & 5 deletions ZergPoolMiner/Stats/Stats.cs
Original file line number Diff line number Diff line change
Expand Up @@ -617,11 +617,12 @@ public static void GetWalletBalanceEx(object sender, EventArgs e)
if (!double.IsNaN(average))
{
alg.adaptive_factor = average;
} else
{
alg.adaptive_factor = 0;
alg.adaptive_profit = 0;
}
}
}
else
{
alg.adaptive_factor = 0;
alg.adaptive_profit = 0;
}
}
}
Expand Down
3 changes: 3 additions & 0 deletions ZergPoolMiner/Updater/Updater.cs
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,7 @@ public static string betweenStrings(string text, string start, string end)
public static void ShowHistory(bool force)
{
string fileHistory = "";
/*
if (ConfigManager.GeneralConfig.Language == LanguageType.Ru)
{
fileHistory = "Help\\history_ru.txt";
Expand All @@ -331,6 +332,8 @@ public static void ShowHistory(bool force)
{
fileHistory = "Help\\history_en.txt";
}
*/
fileHistory = "Help\\history.txt";

if (File.Exists(fileHistory))
{
Expand Down
2 changes: 1 addition & 1 deletion ZergPoolMiner/Utils/BINS_CODEGEN.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public static class MinersBins
@"/lolMiner/lolMiner.exe",
@"/miniZ/miniZ.exe",
@"/Rigel/rigel.exe",
@"/Fork_Fix_0.1.txt"
@"/Fork_Fix_0.2.txt"
};
}
}
2 changes: 1 addition & 1 deletion ZergPoolMiner/langs/en.lang
Original file line number Diff line number Diff line change
Expand Up @@ -561,7 +561,7 @@
"Form_Settings_groupBoxInfo": "Info",
"Form_Settings_groupBoxUpdates": "Program updates",
"Form_Settings_groupBoxBackup": "Backup",
"Form_Settings_richTextBoxInfo": " (for ZergPool)",
"Form_Settings_richTextBoxInfo": " (for ZergPool) this is an unofficial branch of the program created by https://github.com/angelbbs with community support https://bitcointalk.org/index.php?topic=5516906.0 and https://github.com/angelbbs/ZergPoolMinerLegacy/issues",
"Form_Settings_Currentversion": "Current version: ",
"Form_Settings_Errorwhencheckingnewversion": "Error when checking new version",
"Form_Settings_Currentbuild": ". Build: ",
Expand Down
2 changes: 1 addition & 1 deletion ZergPoolMiner/langs/ru.lang
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,7 @@
"Form_Settings_groupBoxInfo": "Информация",
"Form_Settings_groupBoxUpdates": "Обновление программы",
"Form_Settings_groupBoxBackup": "Резервное копирование",
"Form_Settings_richTextBoxInfo": " (для ZergPool)",
"Form_Settings_richTextBoxInfo": " (для ZergPool) это неофициальная ветка программы, созданная https://github.com/angelbbs при поддержке сообществ https://bitcointalk.org/index.php?topic=5516903.0 и https://github.com/angelbbs/ZergPoolMinerLegacy/issues",
"Form_Settings_Currentversion": "Текущая версия: ",
"Form_Settings_Errorwhencheckingnewversion": "Ошибка при проверке новой версии",
"Form_Settings_Currentbuild": ". Сборка: ",
Expand Down

0 comments on commit c5c826d

Please sign in to comment.