diff options
author | practicalswift <practicalswift@users.noreply.github.com> | 2019-03-29 09:55:21 +0100 |
---|---|---|
committer | practicalswift <practicalswift@users.noreply.github.com> | 2019-03-29 15:14:35 +0100 |
commit | 5fd73c8694b51371b9a72e984783db836b6e73c9 (patch) | |
tree | 0cc3d4a56cb280252d34f3946190c442d76991a7 | |
parent | e502c3c515896a67b8a753f1c186398c3a58df2c (diff) | |
download | bitcoin-5fd73c8694b51371b9a72e984783db836b6e73c9.tar.xz |
Avoid repeated log messages in tests by connecting to signal handlers (ThreadSafeMessageBox, etc.) only once
-rw-r--r-- | src/test/test_bitcoin.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
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() |