diff --git a/p2p/src/main/java/bisq/network/p2p/P2PService.java b/p2p/src/main/java/bisq/network/p2p/P2PService.java index 43be1f6327..e95cc8dff5 100644 --- a/p2p/src/main/java/bisq/network/p2p/P2PService.java +++ b/p2p/src/main/java/bisq/network/p2p/P2PService.java @@ -258,7 +258,7 @@ public class P2PService implements SetupListener, MessageListener, ConnectionLis if (!seedNodesAvailable) { isBootstrapped = true; - mailboxMessageService.onNoSeedNodeAvailable(); + mailboxMessageService.onBootstrapped(); p2pServiceListeners.forEach(P2PServiceListener::onNoSeedNodeAvailable); } } @@ -321,7 +321,7 @@ public class P2PService implements SetupListener, MessageListener, ConnectionLis // We don't use a listener at mailboxMessageService as we require the correct // order of execution. The p2pServiceListeners must be called after // mailboxMessageService.onUpdatedDataReceived. - mailboxMessageService.onUpdatedDataReceived(); + mailboxMessageService.onBootstrapped(); p2pServiceListeners.forEach(P2PServiceListener::onUpdatedDataReceived); p2PDataStorage.onBootstrapComplete(); @@ -330,7 +330,7 @@ public class P2PService implements SetupListener, MessageListener, ConnectionLis @Override public void onNoSeedNodeAvailable() { - mailboxMessageService.onNoSeedNodeAvailable(); + mailboxMessageService.onBootstrapped(); p2pServiceListeners.forEach(P2PServiceListener::onNoSeedNodeAvailable); } diff --git a/p2p/src/main/java/bisq/network/p2p/mailbox/MailboxMessageService.java b/p2p/src/main/java/bisq/network/p2p/mailbox/MailboxMessageService.java index 1b79ea29c1..e505c45738 100644 --- a/p2p/src/main/java/bisq/network/p2p/mailbox/MailboxMessageService.java +++ b/p2p/src/main/java/bisq/network/p2p/mailbox/MailboxMessageService.java @@ -218,7 +218,7 @@ public class MailboxMessageService implements HashMapChangedListener, PersistedD // We don't listen on requestDataManager directly as we require the correct // order of execution. The p2pService is handling the correct order of execution and we get called // directly from there. - public void onUpdatedDataReceived() { + public void onBootstrapped() { if (!isBootstrapped) { isBootstrapped = true; // Only now we start listening and processing. The p2PDataStorage is our cache for data we have received @@ -228,15 +228,6 @@ public class MailboxMessageService implements HashMapChangedListener, PersistedD } } - public void onNoSeedNodeAvailable() { - if (!isBootstrapped) { - isBootstrapped = true; - // As we do not expect a updated data request response we start here with addHashMapChangedListenerAndApply - addHashMapChangedListenerAndApply(); - maybeRepublishMailBoxMessages(); - } - } - public void sendEncryptedMailboxMessage(NodeAddress peer, PubKeyRing peersPubKeyRing,