aboutsummaryrefslogtreecommitdiff
path: root/src/qt/test/test_main.cpp
diff options
context:
space:
mode:
authorRussell Yanofsky <russ@yanofsky.org>2018-08-23 13:42:31 -0400
committerRussell Yanofsky <russ@yanofsky.org>2020-08-26 05:52:31 -0400
commit102abff9eb6c267af64f2a3560712147d1896e13 (patch)
treec9501b6cc14050d044f50bbfc45d668370679be0 /src/qt/test/test_main.cpp
parent91aced7c7e6e75c1f5896b7e3843015177f32748 (diff)
downloadbitcoin-102abff9eb6c267af64f2a3560712147d1896e13.tar.xz
gui: Replace interface::Node references with pointers
No change in behavior. Replacing references with pointers allows Node interface creation to be delayed until later during gui startup next commit to support implementing -ipcconnect option
Diffstat (limited to 'src/qt/test/test_main.cpp')
-rw-r--r--src/qt/test/test_main.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/qt/test/test_main.cpp b/src/qt/test/test_main.cpp
index 2ffb452ade..86356b43c8 100644
--- a/src/qt/test/test_main.cpp
+++ b/src/qt/test/test_main.cpp
@@ -68,10 +68,11 @@ int main(int argc, char* argv[])
// Don't remove this, it's needed to access
// QApplication:: and QCoreApplication:: in the tests
- BitcoinApplication app(*node);
+ BitcoinApplication app;
+ app.setNode(*node);
app.setApplicationName("Bitcoin-Qt-test");
- node->context()->args = &gArgs; // Make gArgs available in the NodeContext
+ app.node().context()->args = &gArgs; // Make gArgs available in the NodeContext
AppTests app_tests(app);
if (QTest::qExec(&app_tests) != 0) {
fInvalid = true;
@@ -80,7 +81,7 @@ int main(int argc, char* argv[])
if (QTest::qExec(&test1) != 0) {
fInvalid = true;
}
- RPCNestedTests test3(*node);
+ RPCNestedTests test3(app.node());
if (QTest::qExec(&test3) != 0) {
fInvalid = true;
}
@@ -89,11 +90,11 @@ int main(int argc, char* argv[])
fInvalid = true;
}
#ifdef ENABLE_WALLET
- WalletTests test5(*node);
+ WalletTests test5(app.node());
if (QTest::qExec(&test5) != 0) {
fInvalid = true;
}
- AddressBookTests test6(*node);
+ AddressBookTests test6(app.node());
if (QTest::qExec(&test6) != 0) {
fInvalid = true;
}