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
This commit is contained in:
Russell Yanofsky
2018-08-23 13:42:31 -04:00
parent 91aced7c7e
commit 102abff9eb
9 changed files with 74 additions and 41 deletions

View File

@@ -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;
}