PR12988 backport https://github.com/bitcoin/bitcoin/pull/12988/files
d86edd3 Hold cs_main while calling UpdatedBlockTip() and ui.NotifyBlockTip (Jesse Cohen)
D3435 was backported out of order and included the code elements from
this PR. This completes the remainder of this backport, which by now
is just comments.