aboutsummaryrefslogtreecommitdiff
path: root/src/qt/test
diff options
context:
space:
mode:
authorRussell Yanofsky <russ@yanofsky.org>2017-04-17 14:23:14 -0400
committerJohn Newbery <john@johnnewbery.com>2018-04-04 16:52:40 -0400
commitc0f2756be517feddacd7c6b89b9faa888b3fef8e (patch)
tree14986754eac1bc64cf1b409237bc1b6edc85ed26 /src/qt/test
parent71e0d90876efd11e2a4aeb8f3f806c5a1fd54b42 (diff)
Remove direct bitcoin calls from qt/optionsmodel.cpp
Diffstat (limited to 'src/qt/test')
-rw-r--r--src/qt/test/paymentservertests.cpp4
-rw-r--r--src/qt/test/wallettests.cpp4
2 files changed, 6 insertions, 2 deletions
diff --git a/src/qt/test/paymentservertests.cpp b/src/qt/test/paymentservertests.cpp
index 29ef4b4c9e..dce32e01ba 100644
--- a/src/qt/test/paymentservertests.cpp
+++ b/src/qt/test/paymentservertests.cpp
@@ -9,6 +9,7 @@
#include <amount.h>
#include <chainparams.h>
+#include <interface/node.h>
#include <random.h>
#include <script/script.h>
#include <script/standard.h>
@@ -66,7 +67,8 @@ static SendCoinsRecipient handleRequest(PaymentServer* server, std::vector<unsig
void PaymentServerTests::paymentServerTests()
{
SelectParams(CBaseChainParams::MAIN);
- OptionsModel optionsModel;
+ auto node = interface::MakeNode();
+ OptionsModel optionsModel(*node);
PaymentServer* server = new PaymentServer(nullptr, false);
X509_STORE* caStore = X509_STORE_new();
X509_STORE_add_cert(caStore, parse_b64der_cert(caCert1_BASE64));
diff --git a/src/qt/test/wallettests.cpp b/src/qt/test/wallettests.cpp
index c9898e52ca..ebca4b6499 100644
--- a/src/qt/test/wallettests.cpp
+++ b/src/qt/test/wallettests.cpp
@@ -1,5 +1,6 @@
#include <qt/test/wallettests.h>
+#include <interface/node.h>
#include <qt/bitcoinamountfield.h>
#include <qt/callback.h>
#include <qt/optionsmodel.h>
@@ -175,7 +176,8 @@ void TestGUI()
std::unique_ptr<const PlatformStyle> platformStyle(PlatformStyle::instantiate("other"));
SendCoinsDialog sendCoinsDialog(platformStyle.get());
TransactionView transactionView(platformStyle.get());
- OptionsModel optionsModel;
+ auto node = interface::MakeNode();
+ OptionsModel optionsModel(*node);
WalletModel walletModel(platformStyle.get(), &wallet, &optionsModel);
sendCoinsDialog.setModel(&walletModel);
transactionView.setModel(&walletModel);