mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-13 12:33:42 +02:00
ui: Compile boost:signals2 only once
This commit is contained in:
parent
fad42e8c4a
commit
fa5ce27385
5 changed files with 95 additions and 34 deletions
12
src/init.cpp
12
src/init.cpp
|
|
@ -326,12 +326,12 @@ static void registerSignalHandler(int signal, void(*handler)(int))
|
|||
|
||||
static void OnRPCStarted()
|
||||
{
|
||||
uiInterface.NotifyBlockTip.connect(&RPCNotifyBlockChange);
|
||||
uiInterface.NotifyBlockTip_connect(&RPCNotifyBlockChange);
|
||||
}
|
||||
|
||||
static void OnRPCStopped()
|
||||
{
|
||||
uiInterface.NotifyBlockTip.disconnect(&RPCNotifyBlockChange);
|
||||
uiInterface.NotifyBlockTip_disconnect(&RPCNotifyBlockChange);
|
||||
RPCNotifyBlockChange(false, nullptr);
|
||||
g_best_block_cv.notify_all();
|
||||
LogPrint(BCLog::RPC, "RPC stopped.\n");
|
||||
|
|
@ -1290,7 +1290,7 @@ bool AppInitMain()
|
|||
*/
|
||||
if (gArgs.GetBoolArg("-server", false))
|
||||
{
|
||||
uiInterface.InitMessage.connect(SetRPCWarmupStatus);
|
||||
uiInterface.InitMessage_connect(SetRPCWarmupStatus);
|
||||
if (!AppInitServers())
|
||||
return InitError(_("Unable to start HTTP server. See debug log for details."));
|
||||
}
|
||||
|
|
@ -1647,13 +1647,13 @@ bool AppInitMain()
|
|||
// Either install a handler to notify us when genesis activates, or set fHaveGenesis directly.
|
||||
// No locking, as this happens before any background thread is started.
|
||||
if (chainActive.Tip() == nullptr) {
|
||||
uiInterface.NotifyBlockTip.connect(BlockNotifyGenesisWait);
|
||||
uiInterface.NotifyBlockTip_connect(BlockNotifyGenesisWait);
|
||||
} else {
|
||||
fHaveGenesis = true;
|
||||
}
|
||||
|
||||
if (gArgs.IsArgSet("-blocknotify"))
|
||||
uiInterface.NotifyBlockTip.connect(BlockNotifyCallback);
|
||||
uiInterface.NotifyBlockTip_connect(BlockNotifyCallback);
|
||||
|
||||
std::vector<fs::path> vImportFiles;
|
||||
for (const std::string& strFile : gArgs.GetArgs("-loadblock")) {
|
||||
|
|
@ -1671,7 +1671,7 @@ bool AppInitMain()
|
|||
while (!fHaveGenesis && !ShutdownRequested()) {
|
||||
condvar_GenesisWait.wait_for(lock, std::chrono::milliseconds(500));
|
||||
}
|
||||
uiInterface.NotifyBlockTip.disconnect(BlockNotifyGenesisWait);
|
||||
uiInterface.NotifyBlockTip_disconnect(BlockNotifyGenesisWait);
|
||||
}
|
||||
|
||||
if (ShutdownRequested()) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue