@@ -71,7 +71,8 @@ std::ostream& operator<<(std::ostream& os, const uint256& num)
71
71
}
72
72
73
73
BasicTestingSetup::BasicTestingSetup (const std::string& chainName, const std::vector<const char *>& extra_args)
74
- : m_path_root{fs::temp_directory_path () / " test_common_" PACKAGE_NAME / g_insecure_rand_ctx_temp_path.rand256 ().ToString ()}
74
+ : m_path_root{fs::temp_directory_path () / " test_common_" PACKAGE_NAME / g_insecure_rand_ctx_temp_path.rand256 ().ToString ()},
75
+ m_args{}
75
76
{
76
77
const std::vector<const char *> arguments = Cat (
77
78
{
@@ -87,6 +88,7 @@ BasicTestingSetup::BasicTestingSetup(const std::string& chainName, const std::ve
87
88
extra_args);
88
89
util::ThreadRename (" test" );
89
90
fs::create_directories (m_path_root);
91
+ m_args.ForceSetArg (" -datadir" , m_path_root.string ());
90
92
gArgs .ForceSetArg (" -datadir" , m_path_root.string ());
91
93
ClearDatadirCache ();
92
94
{
@@ -191,7 +193,7 @@ TestingSetup::TestingSetup(const std::string& chainName, const std::vector<const
191
193
}
192
194
193
195
m_node.addrman = std::make_unique<CAddrMan>();
194
- m_node.banman = std::make_unique<BanMan>(GetDataDir () / " banlist.dat" , nullptr , DEFAULT_MISBEHAVING_BANTIME);
196
+ m_node.banman = std::make_unique<BanMan>(m_args. GetDataDirPath () / " banlist.dat" , nullptr , DEFAULT_MISBEHAVING_BANTIME);
195
197
m_node.connman = std::make_unique<CConnman>(0x1337 , 0x1337 , *m_node.addrman ); // Deterministic randomness for tests.
196
198
m_node.peerman = PeerManager::make (chainparams, *m_node.connman , *m_node.addrman ,
197
199
m_node.banman .get (), *m_node.scheduler , *m_node.chainman ,
0 commit comments