Skip to content

Commit

Permalink
- Modified pool hostname to always use IP address
Browse files Browse the repository at this point in the history
- Updated version
- Updated fastlane changelog
  • Loading branch information
Mas7erMind committed Apr 8, 2020
1 parent 148950a commit aa3dac4
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 7 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ android {
applicationId "io.scalaproject.androidminer"
minSdkVersion 17
targetSdkVersion 28
versionCode 3
versionName "1.2.0"
versionCode 4
versionName "1.3.0"
buildConfigField "long", "BUILD_TIME", System.currentTimeMillis() + "L"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -218,25 +218,30 @@ public void stopMining() {
}

public static String getIpByHost(PoolItem pi) {
String hostName = pi.getPool() + ":" + pi.getPort();
return pi.getPoolIP();

/*String hostName = pi.getPool() + ":" + pi.getPort();
try {
Log.i(LOG_TAG, hostName);
InetAddress inetAddress = Inet4Address.getByName(hostName);
return inetAddress.getHostAddress();
if(!inetAddress.isLoopbackAddress()) {
if (inetAddress instanceof Inet6Address) {
return pi.getPoolIP(); // workaround for IPv6
} else if (inetAddress instanceof Inet4Address) {
return inetAddress.getHostAddress().toString();
return inetAddress.getHostAddress();
}
}
} catch (UnknownHostException e) {
Log.i(LOG_TAG, e.toString());
return hostName;
}
return hostName;
return hostName;*/
}

public void startMining(MiningConfig config) {
Expand Down
1 change: 0 additions & 1 deletion app/src/main/java/io/scalaproject/androidminer/Tools.java
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,6 @@ static void copyDirectoryContents(Context context, String assetFilePath, String
copyDirectoryContents(context, assetFilePath + "/" + f, localFilePath + "/" + f);
}
}

}

static String getDeviceName() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,6 @@ public String getPort() {
return custom_port;
}


if(custom_port.equals("") || custom_port.equals(this.mPort)) {
return this.mPort;
}
Expand Down
1 change: 1 addition & 0 deletions fastlane/metadata/android/en-US/changelog/4.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Improved greatly miner's performance

0 comments on commit aa3dac4

Please sign in to comment.