Move g_signals.SetBestChain(..) below SyncWithWallets