Skip to content

Commit

Permalink
Fix initialization ordering issue
Browse files Browse the repository at this point in the history
TradeManager must be inited before MailboxMessageService
  • Loading branch information
jmacxx committed Feb 22, 2021
1 parent 314e6ce commit 0e5c7e5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion core/src/main/java/bisq/core/app/DomainInitialisation.java
Original file line number Diff line number Diff line change
Expand Up @@ -196,12 +196,12 @@ public void initDomainServices(Consumer<String> rejectedTxErrorMessageHandler,

tradeLimits.onAllServicesInitialized();

tradeManager.onAllServicesInitialized();
arbitrationManager.onAllServicesInitialized();
mediationManager.onAllServicesInitialized();
refundManager.onAllServicesInitialized();
traderChatManager.onAllServicesInitialized();

tradeManager.onAllServicesInitialized();
closedTradableManager.onAllServicesInitialized();
failedTradesManager.onAllServicesInitialized();
xmrTxProofService.onAllServicesInitialized();
Expand Down
9 changes: 4 additions & 5 deletions p2p/src/main/java/bisq/network/p2p/P2PService.java
Original file line number Diff line number Diff line change
Expand Up @@ -334,13 +334,12 @@ private void applyIsBootstrapped(Consumer<P2PServiceListener> listenerHandler) {

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
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();
}
}

Expand Down

0 comments on commit 0e5c7e5

Please sign in to comment.