Fix initialization ordering issue

TradeManager must be inited before MailboxMessageService
This commit is contained in:
jmacxx 2021-02-22 17:56:30 -06:00 committed by Christoph Atteneder
parent cee20edfce
commit b3263be5e9
No known key found for this signature in database
GPG Key ID: CD5DC1C529CDFD3B
2 changed files with 5 additions and 6 deletions

View File

@ -196,12 +196,12 @@ public class DomainInitialisation {
tradeLimits.onAllServicesInitialized(); tradeLimits.onAllServicesInitialized();
tradeManager.onAllServicesInitialized();
arbitrationManager.onAllServicesInitialized(); arbitrationManager.onAllServicesInitialized();
mediationManager.onAllServicesInitialized(); mediationManager.onAllServicesInitialized();
refundManager.onAllServicesInitialized(); refundManager.onAllServicesInitialized();
traderChatManager.onAllServicesInitialized(); traderChatManager.onAllServicesInitialized();
tradeManager.onAllServicesInitialized();
closedTradableManager.onAllServicesInitialized(); closedTradableManager.onAllServicesInitialized();
failedTradesManager.onAllServicesInitialized(); failedTradesManager.onAllServicesInitialized();
xmrTxProofService.onAllServicesInitialized(); xmrTxProofService.onAllServicesInitialized();

View File

@ -334,13 +334,12 @@ public class P2PService implements SetupListener, MessageListener, ConnectionLis
p2PDataStorage.onBootstrapped(); p2PDataStorage.onBootstrapped();
// 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.onBootstrapped();
// Once we have applied the state in the P2P domain we notify our listeners // Once we have applied the state in the P2P domain we notify our listeners
p2pServiceListeners.forEach(listenerHandler); p2pServiceListeners.forEach(listenerHandler);
// We don't use a listener at mailboxMessageService as we require the correct
// order of execution. The p2pServiceListeners must be called before.
mailboxMessageService.onBootstrapped();
} }
} }