Changeset View
Changeset View
Standalone View
Standalone View
src/qt/test/paymentservertests.cpp
// Copyright (c) 2009-2015 The Bitcoin Core developers | // Copyright (c) 2009-2015 The Bitcoin Core developers | ||||
// Distributed under the MIT software license, see the accompanying | // Distributed under the MIT software license, see the accompanying | ||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php. | // file COPYING or http://www.opensource.org/licenses/mit-license.php. | ||||
#include "paymentservertests.h" | #include "paymentservertests.h" | ||||
#include "optionsmodel.h" | #include "optionsmodel.h" | ||||
#include "paymentrequestdata.h" | #include "paymentrequestdata.h" | ||||
#include "amount.h" | #include "amount.h" | ||||
#include "interface/node.h" | #include "interfaces/node.h" | ||||
#include "random.h" | #include "random.h" | ||||
#include "script/script.h" | #include "script/script.h" | ||||
#include "script/standard.h" | #include "script/standard.h" | ||||
#include "util.h" | #include "util.h" | ||||
#include "utilstrencodings.h" | #include "utilstrencodings.h" | ||||
#include <openssl/x509.h> | #include <openssl/x509.h> | ||||
#include <openssl/x509_vfy.h> | #include <openssl/x509_vfy.h> | ||||
Show All 40 Lines | QObject::disconnect(server, | ||||
&sigCatcher, SLOT(getRecipient(SendCoinsRecipient))); | &sigCatcher, SLOT(getRecipient(SendCoinsRecipient))); | ||||
// Return results from sigCatcher | // Return results from sigCatcher | ||||
return sigCatcher.recipient; | return sigCatcher.recipient; | ||||
} | } | ||||
void PaymentServerTests::paymentServerTests() { | void PaymentServerTests::paymentServerTests() { | ||||
SelectParams(CBaseChainParams::MAIN); | SelectParams(CBaseChainParams::MAIN); | ||||
auto node = interface::MakeNode(); | auto node = interfaces::MakeNode(); | ||||
OptionsModel optionsModel(*node); | OptionsModel optionsModel(*node); | ||||
PaymentServer *server = new PaymentServer(nullptr, false); | PaymentServer *server = new PaymentServer(nullptr, false); | ||||
X509_STORE *caStore = X509_STORE_new(); | X509_STORE *caStore = X509_STORE_new(); | ||||
X509_STORE_add_cert(caStore, parse_b64der_cert(caCert1_BASE64)); | X509_STORE_add_cert(caStore, parse_b64der_cert(caCert1_BASE64)); | ||||
PaymentServer::LoadRootCAs(caStore); | PaymentServer::LoadRootCAs(caStore); | ||||
server->setOptionsModel(&optionsModel); | server->setOptionsModel(&optionsModel); | ||||
server->uiReady(); | server->uiReady(); | ||||
▲ Show 20 Lines • Show All 145 Lines • Show Last 20 Lines |