During the GUI startup, there is currently an accumulation of cs_main locks due to setting initial chain state values at multiple locations (in the GUI main thread).
This PR tries to cache the initial chain state (tip height, tip time, best header, etc.) short after loading the blockindex.
The cached values are then used instead of fetching them again (and thus locking cs_main
) during setting the client model.
This should fix the initial GUI blocking often experienced during or short after the splashscreen. On mac, best tested together with #19007.