forked from Qortal/qortal
Update splash frame statuses when reshaping, pruning, or building the block archive
This commit is contained in:
parent
7e5dd62a92
commit
b00c1c1575
@ -3,6 +3,7 @@ package org.qortal.repository.hsqldb;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.qortal.controller.Controller;
|
||||
import org.qortal.gui.SplashFrame;
|
||||
import org.qortal.repository.BlockArchiveWriter;
|
||||
import org.qortal.repository.DataException;
|
||||
import org.qortal.repository.Repository;
|
||||
@ -40,6 +41,7 @@ public class HSQLDBDatabaseArchiving {
|
||||
}
|
||||
|
||||
LOGGER.info("Building block archive - this process could take a while... (approx. 15 mins on high spec)");
|
||||
SplashFrame.getInstance().updateStatus("Building block archive, please wait...");
|
||||
|
||||
final int maximumArchiveHeight = BlockArchiveWriter.getMaxArchiveHeight(repository);
|
||||
int startHeight = 0;
|
||||
|
@ -4,10 +4,10 @@ import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.qortal.controller.Controller;
|
||||
import org.qortal.data.block.BlockData;
|
||||
import org.qortal.gui.SplashFrame;
|
||||
import org.qortal.repository.BlockArchiveWriter;
|
||||
import org.qortal.repository.DataException;
|
||||
import org.qortal.repository.Repository;
|
||||
import org.qortal.repository.RepositoryManager;
|
||||
import org.qortal.settings.Settings;
|
||||
|
||||
import java.sql.ResultSet;
|
||||
@ -61,6 +61,7 @@ public class HSQLDBDatabasePruning {
|
||||
|
||||
LOGGER.info("Starting bulk prune of AT states - this process could take a while... " +
|
||||
"(approx. 2 mins on high spec, or upwards of 30 mins in some cases)");
|
||||
SplashFrame.getInstance().updateStatus("Pruning database, please wait...");
|
||||
|
||||
// Create new AT-states table to hold smaller dataset
|
||||
repository.executeCheckedUpdate("DROP TABLE IF EXISTS ATStatesNew");
|
||||
|
@ -10,6 +10,7 @@ import java.util.stream.Collectors;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.qortal.controller.tradebot.BitcoinACCTv1TradeBot;
|
||||
import org.qortal.gui.SplashFrame;
|
||||
|
||||
public class HSQLDBDatabaseUpdates {
|
||||
|
||||
@ -27,9 +28,13 @@ public class HSQLDBDatabaseUpdates {
|
||||
public static boolean updateDatabase(Connection connection) throws SQLException {
|
||||
final boolean wasPristine = fetchDatabaseVersion(connection) == 0;
|
||||
|
||||
SplashFrame.getInstance().updateStatus("Upgrading database, please wait...");
|
||||
|
||||
while (databaseUpdating(connection, wasPristine))
|
||||
incrementDatabaseVersion(connection);
|
||||
|
||||
SplashFrame.getInstance().updateStatus("Starting Qortal Core...");
|
||||
|
||||
return wasPristine;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user