message: Move wallet callbacks into cs_main.
  adaptation of btc@989989354b68d3954fe2742b96c53eeb2e8a7670
diff: @@ -3031,14 +3031,8 @@ bool ActivateBestChain(CValidationState& state, const CBlock* pblock, bool fAlre
  pindexNewTip = chainActive.Tip();
  pindexFork = chainActive.FindFork(pindexOldTip);
  fInitialDownload = IsInitialBlockDownload();
  - break;
  - }
  -
  - // When we reach this point, we switched to a new tip (stored in pindexNewTip).
  - // Notifications/callbacks that can run without cs_main
  // throw all transactions though the signal-interface
  - // while _not_ holding the cs_main lock
  for (const CTransaction &tx : txConflicted) {
  GetMainSignals().SyncTransaction(tx, pindexNewTip, CMainSignals::SYNC_TRANSACTION_NOT_IN_BLOCK);
  }
  @@ -3047,6 +3041,12 @@ bool ActivateBestChain(CValidationState& state, const CBlock* pblock, bool fAlre
  GetMainSignals().SyncTransaction(std::get<0>(txChanged[i]), std::get<1>(txChanged[i]), std::get<2>(txChanged[i]));
  }
  + break;
  + }
  +
  + // When we reach this point, we switched to a new tip (stored in pindexNewTip).
  + // Notifications/callbacks that can run without cs_main
  +
  // Always notify the UI if a new block tip was connected
  if (pindexFork != pindexNewTip) {
  