From a0bc57c89344516cccd3c3d7ef60eb286bd3e736 Mon Sep 17 00:00:00 2001 From: woodser Date: Sat, 22 Apr 2023 17:26:45 -0400 Subject: [PATCH] walletAndNetworkReady does not wait for sufficient broadcast peers --- core/src/main/java/haveno/core/app/AppStartupState.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/core/src/main/java/haveno/core/app/AppStartupState.java b/core/src/main/java/haveno/core/app/AppStartupState.java index 89c0809b67..94767beb0e 100644 --- a/core/src/main/java/haveno/core/app/AppStartupState.java +++ b/core/src/main/java/haveno/core/app/AppStartupState.java @@ -73,14 +73,14 @@ public class AppStartupState { p2pNetworkAndWalletInitialized = EasyBind.combine(updatedDataReceived, isBlockDownloadComplete, - hasSufficientPeersForBroadcast, + hasSufficientPeersForBroadcast, // TODO: consider sufficient number of peers? allDomainServicesInitialized, (a, b, c, d) -> { - log.info("p2pNetworkAndWalletInitialized = {} = updatedDataReceived={} && isBlockDownloadComplete={} && hasSufficientPeersForBroadcast={} && allDomainServicesInitialized={}", (a && b && c && d), updatedDataReceived.get(), isBlockDownloadComplete.get(), hasSufficientPeersForBroadcast.get(), allDomainServicesInitialized.get()); - if (a && b && c) { + log.info("Combined initialized state = {} = updatedDataReceived={} && isBlockDownloadComplete={} && hasSufficientPeersForBroadcast={} && allDomainServicesInitialized={}", (a && b && c && d), updatedDataReceived.get(), isBlockDownloadComplete.get(), hasSufficientPeersForBroadcast.get(), allDomainServicesInitialized.get()); + if (a && b) { walletAndNetworkReady.set(true); } - return a && d; // app fully initialized before daemon connection and wallet by default + return a && d; // app fully initialized before daemon connection and wallet by default // TODO: rename variable }); p2pNetworkAndWalletInitialized.subscribe((observable, oldValue, newValue) -> { if (newValue) {