bitcoin/bitcoin — pull request #4798 by cozz (2014-08-31 03:15:40+00:00)
Title: Move g_signals.SetBestChain(..) below SyncWithWallets

I believe that the setBestChain-signal should be triggered After we sync the txs.
I tested in regtest, if we write the chainstate, trigger setBestChain, and
then crash before syncing the txs, we dont rescan them.
The same test after this patch showed "Rescanning..." in the
log file.

Looking at old code this was always the case, but has been changed due to refactorings.
Also after this patch, the signal is not triggered for disconnectTip(..) anymore.
I think it doesnt make much sense to trigger there, wasnt the case in old code either.