mirror of
https://github.com/Qortal/altcoinj.git
synced 2025-07-31 20:11:23 +00:00
Minor fixes.
This commit is contained in:
@@ -113,9 +113,13 @@ public class PingService {
|
|||||||
if (max > 0) {
|
if (max > 0) {
|
||||||
System.out.println("Downloading block chain. " + (max > 1000 ? "This may take a while." : ""));
|
System.out.println("Downloading block chain. " + (max > 1000 ? "This may take a while." : ""));
|
||||||
long current = max;
|
long current = max;
|
||||||
|
int lastPercent = 0;
|
||||||
while (current > 0) {
|
while (current > 0) {
|
||||||
double pct = 100.0 - (100.0 * (current / (double) max));
|
double pct = 100.0 - (100.0 * (current / (double) max));
|
||||||
|
if ((int)pct != lastPercent) {
|
||||||
System.out.println(String.format("Chain download %d%% done", (int) pct));
|
System.out.println(String.format("Chain download %d%% done", (int) pct));
|
||||||
|
lastPercent = (int) pct;
|
||||||
|
}
|
||||||
progress.await(1, TimeUnit.SECONDS);
|
progress.await(1, TimeUnit.SECONDS);
|
||||||
current = progress.getCount();
|
current = progress.getCount();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user