mirror of
https://github.com/bisq-network/bisq.git
synced 2024-11-19 01:41:11 +01:00
Merge onUpdatedDataReceived and onNoSeedNodeAvailable to onBootstrapped
This commit is contained in:
parent
44fcfb86bb
commit
49e9f72d6e
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user