Avoid repeated log messages in tests by connecting to signal handlers (ThreadSafeMessageBox, etc.) only once

This commit is contained in:
practicalswift 2019-03-29 09:55:21 +01:00
parent e502c3c515
commit 5fd73c8694

View file

@ -45,7 +45,11 @@ BasicTestingSetup::BasicTestingSetup(const std::string& chainName)
// TODO: fix the code to support SegWit blocks.
gArgs.ForceSetArg("-vbparams", strprintf("segwit:0:%d", (int64_t)Consensus::BIP9Deployment::NO_TIMEOUT));
SelectParams(chainName);
noui_connect();
static bool noui_connected = false;
if (!noui_connected) {
noui_connect();
noui_connected = true;
}
}
BasicTestingSetup::~BasicTestingSetup()