aboutsummaryrefslogtreecommitdiff
path: root/src/test/util
diff options
context:
space:
mode:
authorchinggg <24590067+chinggg@users.noreply.github.com>2022-04-16 11:16:32 +0800
committerchinggg <24590067+chinggg@users.noreply.github.com>2022-04-16 11:16:32 +0800
commitc848a45101b4dbd750739e7a6e5bdeec79920273 (patch)
treeea255394285260248c4b4c879e643767051f27f6 /src/test/util
parentf60a63cc5f16b738d9d2ada3f10b27cf999df323 (diff)
test: fix connman UB by calling derived constructor
Diffstat (limited to 'src/test/util')
-rw-r--r--src/test/util/setup_common.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/test/util/setup_common.cpp b/src/test/util/setup_common.cpp
index 211153f06c..13f17ca277 100644
--- a/src/test/util/setup_common.cpp
+++ b/src/test/util/setup_common.cpp
@@ -15,10 +15,10 @@
#include <interfaces/chain.h>
#include <net.h>
#include <net_processing.h>
-#include <node/miner.h>
-#include <noui.h>
#include <node/blockstorage.h>
#include <node/chainstate.h>
+#include <node/miner.h>
+#include <noui.h>
#include <policy/fees.h>
#include <pow.h>
#include <rpc/blockchain.h>
@@ -28,6 +28,7 @@
#include <script/sigcache.h>
#include <shutdown.h>
#include <streams.h>
+#include <test/util/net.h>
#include <txdb.h>
#include <util/strencodings.h>
#include <util/string.h>
@@ -226,7 +227,7 @@ TestingSetup::TestingSetup(const std::string& chainName, const std::vector<const
/*deterministic=*/false,
m_node.args->GetIntArg("-checkaddrman", 0));
m_node.banman = std::make_unique<BanMan>(m_args.GetDataDirBase() / "banlist", nullptr, DEFAULT_MISBEHAVING_BANTIME);
- m_node.connman = std::make_unique<CConnman>(0x1337, 0x1337, *m_node.addrman); // Deterministic randomness for tests.
+ m_node.connman = std::make_unique<ConnmanTestMsg>(0x1337, 0x1337, *m_node.addrman); // Deterministic randomness for tests.
m_node.peerman = PeerManager::make(chainparams, *m_node.connman, *m_node.addrman,
m_node.banman.get(), *m_node.chainman,
*m_node.mempool, false);