Skip to content

Commit

Permalink
Bug fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
zawawa committed Oct 28, 2017
1 parent 3d76a33 commit 57be2b2
Show file tree
Hide file tree
Showing 6 changed files with 142 additions and 847 deletions.
4 changes: 2 additions & 2 deletions GatelessGateSharp.sln
Original file line number Diff line number Diff line change
Expand Up @@ -349,8 +349,8 @@ Global
{31880FB6-5B86-42B8-AB92-864045B5D7A2}.Debug|x86.Build.0 = Debug|x86
{31880FB6-5B86-42B8-AB92-864045B5D7A2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{31880FB6-5B86-42B8-AB92-864045B5D7A2}.Release|Any CPU.Build.0 = Release|Any CPU
{31880FB6-5B86-42B8-AB92-864045B5D7A2}.Release|Mixed Platforms.ActiveCfg = Release|x86
{31880FB6-5B86-42B8-AB92-864045B5D7A2}.Release|Mixed Platforms.Build.0 = Release|x86
{31880FB6-5B86-42B8-AB92-864045B5D7A2}.Release|Mixed Platforms.ActiveCfg = Release|x64
{31880FB6-5B86-42B8-AB92-864045B5D7A2}.Release|Mixed Platforms.Build.0 = Release|x64
{31880FB6-5B86-42B8-AB92-864045B5D7A2}.Release|Win32.ActiveCfg = Release|x86
{31880FB6-5B86-42B8-AB92-864045B5D7A2}.Release|Win32.Build.0 = Release|x86
{31880FB6-5B86-42B8-AB92-864045B5D7A2}.Release|x64.ActiveCfg = Release|x64
Expand Down
12 changes: 0 additions & 12 deletions GatelessGateSharp/GatelessGateSharp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -79,18 +79,10 @@
<StartupObject>GatelessGateSharp.Program</StartupObject>
</PropertyGroup>
<ItemGroup>
<Reference Include="NBitcoin, Version=4.0.0.38, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\NBitcoin.4.0.0.38\lib\netstandard1.1\NBitcoin.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Newtonsoft.Json, Version=10.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="nunit.framework, Version=3.8.1.0, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL">
<HintPath>..\packages\NUnit.3.8.1\lib\net45\nunit.framework.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.ComponentModel.Composition" />
<Reference Include="System.Core" />
Expand All @@ -102,10 +94,6 @@
<Reference Include="System.Net" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Numerics" />
<Reference Include="System.Runtime.InteropServices.RuntimeInformation, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Runtime.InteropServices.RuntimeInformation.4.3.0\lib\net45\System.Runtime.InteropServices.RuntimeInformation.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
Expand Down
40 changes: 33 additions & 7 deletions GatelessGateSharp/MainForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -870,14 +870,15 @@ enum ApplicationGlobalState

public bool ValidateBitcoinAddress()
{
try
System.Text.RegularExpressions.Regex regex = new System.Text.RegularExpressions.Regex("^[13][a-km-zA-HJ-NP-Z1-9]{25,34}$");
var match = regex.Match(textBoxBitcoinAddress.Text);
if (match.Success)
{
NBitcoin.BitcoinAddress address = (NBitcoin.BitcoinAddress)NBitcoin.Network.Main.CreateBitcoinAddress(textBoxBitcoinAddress.Text);
return true;
}
catch (Exception ex)
else
{
MessageBox.Show("Please enter a valid Biocoin addresss.", appName, MessageBoxButtons.OK, MessageBoxIcon.Error);
MessageBox.Show("Please enter a valid Bitcoin addresss.", appName, MessageBoxButtons.OK, MessageBoxIcon.Error);
return false;
}
}
Expand All @@ -892,7 +893,7 @@ public bool ValidateEthereumAddress()
}
else
{
MessageBox.Show("Please enter a valid Ethereum addresss.", appName, MessageBoxButtons.OK, MessageBoxIcon.Error);
MessageBox.Show("Please enter a valid Ethereum addresss starting with \"0x\".", appName, MessageBoxButtons.OK, MessageBoxIcon.Error);
return false;
}
}
Expand Down Expand Up @@ -948,7 +949,7 @@ public void LaunchEthashMiners(String pool)
if (pool == "NiceHash" || mDevFee)
{
var hosts = new List<StratumServerInfo> {
new StratumServerInfo("daggerhashimoto.usa.nicehash.com", 0),
new StratumServerInfo("daggerhashimoto.usa.nicehash.com", 0),
new StratumServerInfo("daggerhashimoto.eu.nicehash.com", 0),
new StratumServerInfo("daggerhashimoto.hk.nicehash.com", 150),
new StratumServerInfo("daggerhashimoto.jp.nicehash.com", 100),
Expand All @@ -965,7 +966,32 @@ public void LaunchEthashMiners(String pool)
mStratum = new NiceHashEthashStratum(host.name, 3353, (mDevFee ? mDevFeeBitcoinAddress : textBoxBitcoinAddress.Text), "x", pool);
break;
}
catch (Exception ex) { }
catch (Exception ex)
{
MainForm.Logger("Exception: " + ex.Message + ex.StackTrace);
}
}
}
}
else if (pool == "zawawa.net")
{
var hosts = new List<StratumServerInfo> {
new StratumServerInfo("eth-uswest.zawawa.net", 0)
};
hosts.Sort();
foreach (StratumServerInfo host in hosts)
{
if (host.time >= 0)
{
try
{
mStratum = new OpenEthereumPoolEthashStratum(host.name, 4000, textBoxEthereumAddress.Text, "x", pool);
break;
}
catch (Exception ex)
{
MainForm.Logger("Exception: " + ex.Message + ex.StackTrace);
}
}
}
}
Expand Down
34 changes: 0 additions & 34 deletions GatelessGateSharp/packages.config
Original file line number Diff line number Diff line change
@@ -1,38 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Microsoft.NETCore.Platforms" version="1.1.0" targetFramework="net45" />
<package id="NBitcoin" version="4.0.0.38" targetFramework="net45" />
<package id="NETStandard.Library" version="1.6.1" targetFramework="net45" />
<package id="Newtonsoft.Json" version="10.0.3" targetFramework="net45" />
<package id="NUnit" version="3.8.1" targetFramework="net45" />
<package id="System.Collections" version="4.3.0" targetFramework="net45" />
<package id="System.Collections.Concurrent" version="4.3.0" targetFramework="net45" />
<package id="System.Diagnostics.Debug" version="4.3.0" targetFramework="net45" />
<package id="System.Diagnostics.Tools" version="4.3.0" targetFramework="net45" />
<package id="System.Diagnostics.Tracing" version="4.3.0" targetFramework="net45" />
<package id="System.Globalization" version="4.3.0" targetFramework="net45" />
<package id="System.IO" version="4.3.0" targetFramework="net45" />
<package id="System.IO.Compression" version="4.3.0" targetFramework="net45" />
<package id="System.Linq" version="4.3.0" targetFramework="net45" />
<package id="System.Linq.Expressions" version="4.3.0" targetFramework="net45" />
<package id="System.Net.Http" version="4.3.2" targetFramework="net45" />
<package id="System.Net.Primitives" version="4.3.0" targetFramework="net45" />
<package id="System.Net.Requests" version="4.3.0" targetFramework="net45" />
<package id="System.ObjectModel" version="4.3.0" targetFramework="net45" />
<package id="System.Reflection" version="4.3.0" targetFramework="net45" />
<package id="System.Reflection.Extensions" version="4.3.0" targetFramework="net45" />
<package id="System.Reflection.Primitives" version="4.3.0" targetFramework="net45" />
<package id="System.Resources.ResourceManager" version="4.3.0" targetFramework="net45" />
<package id="System.Runtime" version="4.3.0" targetFramework="net45" />
<package id="System.Runtime.Extensions" version="4.3.0" targetFramework="net45" />
<package id="System.Runtime.InteropServices" version="4.3.0" targetFramework="net45" />
<package id="System.Runtime.InteropServices.RuntimeInformation" version="4.3.0" targetFramework="net45" />
<package id="System.Runtime.Numerics" version="4.3.0" targetFramework="net45" />
<package id="System.Text.Encoding" version="4.3.0" targetFramework="net45" />
<package id="System.Text.Encoding.Extensions" version="4.3.0" targetFramework="net45" />
<package id="System.Text.RegularExpressions" version="4.3.0" targetFramework="net45" />
<package id="System.Threading" version="4.3.0" targetFramework="net45" />
<package id="System.Threading.Tasks" version="4.3.0" targetFramework="net45" />
<package id="System.Xml.ReaderWriter" version="4.3.0" targetFramework="net45" />
<package id="System.Xml.XDocument" version="4.3.0" targetFramework="net45" />
</packages>
Loading

0 comments on commit 57be2b2

Please sign in to comment.