From 5fd73c8694b51371b9a72e984783db836b6e73c9 Mon Sep 17 00:00:00 2001 From: practicalswift Date: Fri, 29 Mar 2019 09:55:21 +0100 Subject: [PATCH] Avoid repeated log messages in tests by connecting to signal handlers (ThreadSafeMessageBox, etc.) only once --- src/test/test_bitcoin.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/test/test_bitcoin.cpp b/src/test/test_bitcoin.cpp index cdfd4db589..5141c16e77 100644 --- a/src/test/test_bitcoin.cpp +++ b/src/test/test_bitcoin.cpp @@ -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()