forked from Qortal/qortal
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 {
|
||||
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")) {
|
||||
|
Loading…
Reference in New Issue
Block a user