Increase timeout, add logs

This commit is contained in:
Manfred Karrer 2015-05-04 11:37:55 +02:00
parent 8c978bbeb3
commit 16592cd20a
2 changed files with 5 additions and 2 deletions

View File

@ -97,6 +97,7 @@ public class WalletService {
public static final String DIR_KEY = "wallet.dir";
public static final String PREFIX_KEY = "wallet.prefix";
private static final long STARTUP_TIMEOUT = 60;
private final List<AddressConfidenceListener> addressConfidenceListeners = new CopyOnWriteArrayList<>();
private final List<TxConfidenceListener> txConfidenceListeners = new CopyOnWriteArrayList<>();
@ -215,11 +216,12 @@ public class WalletService {
@Override
public void failed(@NotNull Service.State from, @NotNull Throwable failure) {
walletAppKit = null;
log.error("walletAppKit failed");
status.onError(failure);
}
}, Threading.USER_THREAD);
walletAppKit.startAsync();
return status.timeout(30, TimeUnit.SECONDS);
return status.timeout(STARTUP_TIMEOUT, TimeUnit.SECONDS);
}
private void initWallet() {

View File

@ -62,7 +62,7 @@ import rx.Observable;
class MainViewModel implements ViewModel {
private static final Logger log = LoggerFactory.getLogger(MainViewModel.class);
private static final long BLOCKCHAIN_SYNC_TIMEOUT = 30000;
private static final long BLOCKCHAIN_SYNC_TIMEOUT = 60000;
// BTC network
final StringProperty blockchainSyncInfo = new SimpleStringProperty("Initializing");
@ -186,6 +186,7 @@ class MainViewModel implements ViewModel {
//log.trace("wallet next");
},
error -> Platform.runLater(() -> {
log.trace("wallet error");
setWalletServiceException(error);
}),
() -> {