Skip to content

Commit e5fdda6

Browse files
author
MarcoFalke
committed
Merge bitcoin#16554: test: only include and use OpenSSL where it's actually needed (BIP70)
2f37163 test: only include and init openSSL where it's actually used (fanquake) Pull request description: This should save initializing OpenSSL during tests if compiled with `--disable-bip70`. ACKs for top commit: laanwj: straightforward ACK 2f37163 Tree-SHA512: 513e867718c79b014b4d470404c891d83c21df92eed07abaccd89b88a32f8b801e402e7d0d400c49c1b964f4b76409ca17fb90bde2e2c45dcf8a1897b452683f
2 parents b725979 + 2f37163 commit e5fdda6

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

src/qt/test/paymentservertests.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
#include <test/setup_common.h>
1717
#include <util/strencodings.h>
1818

19+
#include <openssl/ssl.h>
1920
#include <openssl/x509.h>
2021
#include <openssl/x509_vfy.h>
2122

@@ -66,6 +67,7 @@ static SendCoinsRecipient handleRequest(PaymentServer* server, std::vector<unsig
6667

6768
void PaymentServerTests::paymentServerTests()
6869
{
70+
SSL_library_init();
6971
BasicTestingSetup testing_setup(CBaseChainParams::MAIN);
7072
auto node = interfaces::MakeNode();
7173
OptionsModel optionsModel(*node);

src/qt/test/test_main.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@
2626
#include <QObject>
2727
#include <QTest>
2828

29-
#include <openssl/ssl.h>
30-
3129
#if defined(QT_STATICPLUGIN)
3230
#include <QtPlugin>
3331
#if defined(QT_QPA_PLATFORM_MINIMAL)
@@ -73,8 +71,6 @@ int main(int argc, char *argv[])
7371
BitcoinApplication app(*node, argc, argv);
7472
app.setApplicationName("Bitcoin-Qt-test");
7573

76-
SSL_library_init();
77-
7874
AppTests app_tests(app);
7975
if (QTest::qExec(&app_tests) != 0) {
8076
fInvalid = true;

0 commit comments

Comments
 (0)