aboutsummaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorRussell Yanofsky <russ@yanofsky.org>2019-09-17 18:28:03 -0400
committerRussell Yanofsky <russ@yanofsky.org>2019-10-28 10:30:51 -0400
commite6f4f895d5e42feaf7bfa5f41e80292aaa73cd7d (patch)
tree1c12f814ae2ac88316066d334274354c669d7aa5 /src/test
parent4d5448c76b71c9d91399c31b043237091be2e5e7 (diff)
downloadbitcoin-e6f4f895d5e42feaf7bfa5f41e80292aaa73cd7d.tar.xz
Pass NodeContext, ConnMan, BanMan references more places
So g_connman and g_banman globals can be removed next commit.
Diffstat (limited to 'src/test')
-rw-r--r--src/test/rpc_tests.cpp4
-rw-r--r--src/test/setup_common.h2
2 files changed, 4 insertions, 2 deletions
diff --git a/src/test/rpc_tests.cpp b/src/test/rpc_tests.cpp
index 04d909ea36..faff1931cd 100644
--- a/src/test/rpc_tests.cpp
+++ b/src/test/rpc_tests.cpp
@@ -7,8 +7,8 @@
#include <rpc/util.h>
#include <core_io.h>
-#include <init.h>
#include <interfaces/chain.h>
+#include <node/context.h>
#include <test/setup_common.h>
#include <util/time.h>
@@ -113,7 +113,7 @@ BOOST_AUTO_TEST_CASE(rpc_rawsign)
std::string privkey1 = "\"KzsXybp9jX64P5ekX1KUxRQ79Jht9uzW7LorgwE65i5rWACL6LQe\"";
std::string privkey2 = "\"Kyhdf5LuKTRx4ge69ybABsiUAWjVRK4XGxAKk2FQLp2HjGMy87Z4\"";
NodeContext node;
- node.chain = interfaces::MakeChain();
+ node.chain = interfaces::MakeChain(node);
g_rpc_node = &node;
r = CallRPC(std::string("signrawtransactionwithkey ")+notsigned+" [] "+prevout);
BOOST_CHECK(find_value(r.get_obj(), "complete").get_bool() == false);
diff --git a/src/test/setup_common.h b/src/test/setup_common.h
index 6c9494898c..5731b50e31 100644
--- a/src/test/setup_common.h
+++ b/src/test/setup_common.h
@@ -8,6 +8,7 @@
#include <chainparamsbase.h>
#include <fs.h>
#include <key.h>
+#include <node/context.h>
#include <pubkey.h>
#include <random.h>
#include <scheduler.h>
@@ -67,6 +68,7 @@ private:
* Included are coins database, script check threads setup.
*/
struct TestingSetup : public BasicTestingSetup {
+ NodeContext m_node;
boost::thread_group threadGroup;
CScheduler scheduler;