1
0
mirror of https://github.com/Qortal/qortal.git synced 2025-05-20 00:16:59 +00:00

Improved ensureSynchronized() as it would often not notice an unsynced wallet.

This commit is contained in:
CalDescent 2022-05-30 18:14:26 +02:00
parent 5203742b05
commit c30b1145a1

@ -170,6 +170,10 @@ public class PirateChainWalletController extends Thread {
}
public void ensureSynchronized() throws ForeignBlockchainException {
if (this.currentWallet == null || !this.currentWallet.isSynchronized()) {
throw new ForeignBlockchainException("Wallet isn't synchronized yet");
}
String response = LiteWalletJni.execute("syncStatus", "");
JSONObject json = new JSONObject(response);
if (json.has("syncing")) {