Skip to content

Commit

Permalink
fix: move some code from onCreate to check
Browse files Browse the repository at this point in the history
  • Loading branch information
HashEngineering committed Oct 3, 2024
1 parent 06dd808 commit 30af1f7
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -686,6 +686,10 @@ private void check() {

log.info("starting peergroup");
peerGroup = new PeerGroup(Constants.NETWORK_PARAMETERS, blockChain, headerChain);
if (Constants.SUPPORTS_PLATFORM) {
platformRepo.getPlatform().setMasternodeListManager(application.getWallet().getContext().masternodeListManager);
platformSyncService.resume();
}
if (resetMNListsOnPeerGroupStart) {
resetMNListsOnPeerGroupStart = false;
application.getWallet().getContext().masternodeListManager.setBootstrap(mnlistinfoBootStrapStream, qrinfoBootStrapStream, SimplifiedMasternodeListManager.SMLE_VERSION_FORMAT_VERSION);
Expand Down Expand Up @@ -1041,11 +1045,6 @@ public void onCreate() {

peerDiscoveryList.add(dnsDiscovery);

if (Constants.SUPPORTS_PLATFORM) {
platformRepo.getPlatform().setMasternodeListManager(application.getWallet().getContext().masternodeListManager);
platformSyncService.resume();
}

updateAppWidget();
FlowExtKt.observe(blockchainStateDao.observeState(), this, (blockchainState, continuation) -> {
handleBlockchainStateNotification(blockchainState, mixingStatus, mixingProgress);
Expand Down

0 comments on commit 30af1f7

Please sign in to comment.