mirror of
https://github.com/Qortal/qortal.git
synced 2025-05-07 18:27:53 +00:00
Improved ensureSynchronized() as it would often not notice an unsynced wallet.
This commit is contained in:
parent
5203742b05
commit
c30b1145a1
@ -170,6 +170,10 @@ public class PirateChainWalletController extends Thread {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void ensureSynchronized() throws ForeignBlockchainException {
|
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", "");
|
String response = LiteWalletJni.execute("syncStatus", "");
|
||||||
JSONObject json = new JSONObject(response);
|
JSONObject json = new JSONObject(response);
|
||||||
if (json.has("syncing")) {
|
if (json.has("syncing")) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user