Skip to content

Commit 6544cb0

Browse files
authored
Merge pull request dogecoin#3466 from patricklodder/1.15.0-remove-bip70
Remove BIP70 payment requests
2 parents f618ab8 + 22ce2b2 commit 6544cb0

28 files changed

+83
-1971
lines changed

configure.ac

-7
Original file line numberDiff line numberDiff line change
@@ -231,8 +231,6 @@ AC_ARG_WITH([armv82-crypto],
231231
[armv82_crypto=$withval],
232232
[armv82_crypto=no])
233233

234-
AC_ARG_WITH([protoc-bindir],[AS_HELP_STRING([--with-protoc-bindir=BIN_DIR],[specify protoc bin path])], [protoc_bin_path=$withval], [])
235-
236234
AC_ARG_ENABLE(man,
237235
[AS_HELP_STRING([--disable-man],
238236
[do not install man pages (default is to install)])],,
@@ -854,7 +852,6 @@ if test x$use_pkgconfig = xyes; then
854852
[
855853
PKG_CHECK_MODULES([SSL], [libssl],, [AC_MSG_ERROR(openssl not found.)])
856854
PKG_CHECK_MODULES([CRYPTO], [libcrypto],,[AC_MSG_ERROR(libcrypto not found.)])
857-
BITCOIN_QT_CHECK([PKG_CHECK_MODULES([PROTOBUF], [protobuf], [have_protobuf=yes], [BITCOIN_QT_FAIL(libprotobuf not found)])])
858855
if test x$use_qr != xno; then
859856
BITCOIN_QT_CHECK([PKG_CHECK_MODULES([QR], [libqrencode], [have_qrencode=yes], [have_qrencode=no])])
860857
fi
@@ -914,7 +911,6 @@ else
914911
esac
915912
fi
916913

917-
BITCOIN_QT_CHECK(AC_CHECK_LIB([protobuf] ,[main],[PROTOBUF_LIBS=-lprotobuf], BITCOIN_QT_FAIL(libprotobuf not found)))
918914
if test x$use_qr != xno; then
919915
BITCOIN_QT_CHECK([AC_CHECK_LIB([qrencode], [main],[QR_LIBS=-lqrencode], [have_qrencode=no])])
920916
BITCOIN_QT_CHECK([AC_CHECK_HEADER([qrencode.h],, have_qrencode=no)])
@@ -1019,8 +1015,6 @@ AM_CONDITIONAL([EMBEDDED_UNIVALUE],[test x$need_bundled_univalue = xyes])
10191015
AC_SUBST(UNIVALUE_CFLAGS)
10201016
AC_SUBST(UNIVALUE_LIBS)
10211017

1022-
BITCOIN_QT_PATH_PROGS([PROTOC], [protoc],$protoc_bin_path)
1023-
10241018
AC_MSG_CHECKING([whether to build dogecoind])
10251019
AM_CONDITIONAL([BUILD_BITCOIND], [test x$build_bitcoind = xyes])
10261020
AC_MSG_RESULT($build_bitcoind)
@@ -1220,7 +1214,6 @@ AC_SUBST(SSL_LIBS)
12201214
AC_SUBST(EVENT_LIBS)
12211215
AC_SUBST(EVENT_PTHREADS_LIBS)
12221216
AC_SUBST(ZMQ_LIBS)
1223-
AC_SUBST(PROTOBUF_LIBS)
12241217
AC_SUBST(QR_LIBS)
12251218
AC_SUBST(HAVE_FDATASYNC)
12261219
AC_SUBST(HAVE_FULLFSYNC)

src/Makefile.qt.include

+7-18
Original file line numberDiff line numberDiff line change
@@ -162,10 +162,6 @@ QT_QRC = qt/bitcoin.qrc
162162
QT_QRC_LOCALE_CPP = qt/qrc_bitcoin_locale.cpp
163163
QT_QRC_LOCALE = qt/bitcoin_locale.qrc
164164

165-
PROTOBUF_CC = qt/paymentrequest.pb.cc
166-
PROTOBUF_H = qt/paymentrequest.pb.h
167-
PROTOBUF_PROTO = qt/paymentrequest.proto
168-
169165
BITCOIN_QT_H = \
170166
qt/addressbookpage.h \
171167
qt/addresstablemodel.h \
@@ -193,7 +189,6 @@ BITCOIN_QT_H = \
193189
qt/optionsdialog.h \
194190
qt/optionsmodel.h \
195191
qt/overviewpage.h \
196-
qt/paymentrequestplus.h \
197192
qt/paymentserver.h \
198193
qt/peertablemodel.h \
199194
qt/platformstyle.h \
@@ -321,7 +316,6 @@ BITCOIN_QT_WALLET_CPP = \
321316
qt/importkeysdialog.cpp \
322317
qt/openuridialog.cpp \
323318
qt/overviewpage.cpp \
324-
qt/paymentrequestplus.cpp \
325319
qt/paymentserver.cpp \
326320
qt/receivecoinsdialog.cpp \
327321
qt/receiverequestdialog.cpp \
@@ -371,15 +365,15 @@ BITCOIN_QT_INCLUDES = -I$(builddir)/qt -I$(srcdir)/qt -I$(srcdir)/qt/forms \
371365
-I$(builddir)/qt/forms -DQT_NO_KEYWORDS
372366

373367
qt_libdogecoinqt_a_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) $(BITCOIN_QT_INCLUDES) \
374-
$(QT_INCLUDES) $(QT_DBUS_INCLUDES) $(PROTOBUF_CFLAGS) $(QR_CFLAGS)
368+
$(QT_INCLUDES) $(QT_DBUS_INCLUDES) $(QR_CFLAGS)
375369
qt_libdogecoinqt_a_CXXFLAGS = $(AM_CXXFLAGS) $(QT_PIE_FLAGS)
376370
qt_libdogecoinqt_a_OBJCXXFLAGS = $(AM_OBJCXXFLAGS) $(QT_PIE_FLAGS)
377371

378372
qt_libdogecoinqt_a_SOURCES = $(BITCOIN_QT_CPP) $(BITCOIN_QT_H) $(QT_FORMS_UI) \
379-
$(QT_QRC) $(QT_QRC_LOCALE) $(QT_TS) $(PROTOBUF_PROTO) $(RES_ICONS) $(RES_IMAGES) $(RES_MOVIES) $(RES_FONTS)
373+
$(QT_QRC) $(QT_QRC_LOCALE) $(QT_TS) $(RES_ICONS) $(RES_IMAGES) $(RES_MOVIES) $(RES_FONTS)
380374

381-
nodist_qt_libdogecoinqt_a_SOURCES = $(QT_MOC_CPP) $(QT_MOC) $(PROTOBUF_CC) \
382-
$(PROTOBUF_H) $(QT_QRC_CPP) $(QT_QRC_LOCALE_CPP)
375+
nodist_qt_libdogecoinqt_a_SOURCES = $(QT_MOC_CPP) $(QT_MOC) \
376+
$(QT_QRC_CPP) $(QT_QRC_LOCALE_CPP)
383377

384378
# forms/foo.h -> forms/ui_foo.h
385379
QT_FORMS_H=$(join $(dir $(QT_FORMS_UI)),$(addprefix ui_, $(notdir $(QT_FORMS_UI:.ui=.h))))
@@ -389,14 +383,9 @@ QT_FORMS_H=$(join $(dir $(QT_FORMS_UI)),$(addprefix ui_, $(notdir $(QT_FORMS_UI:
389383
$(QT_MOC): $(QT_FORMS_H)
390384
$(qt_libdogecoinqt_a_OBJECTS) $(qt_dogecoin_qt_OBJECTS) : | $(QT_MOC)
391385

392-
#Generating these with a half-written protobuf header leads to wacky results.
393-
#This makes sure it's done.
394-
$(QT_MOC): $(PROTOBUF_H)
395-
$(QT_MOC_CPP): $(PROTOBUF_H)
396-
397386
# bitcoin-qt binary #
398387
qt_dogecoin_qt_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) $(BITCOIN_QT_INCLUDES) \
399-
$(QT_INCLUDES) $(PROTOBUF_CFLAGS) $(QR_CFLAGS)
388+
$(QT_INCLUDES) $(QR_CFLAGS)
400389
qt_dogecoin_qt_CXXFLAGS = $(AM_CXXFLAGS) $(QT_PIE_FLAGS)
401390

402391
qt_dogecoin_qt_SOURCES = qt/bitcoin.cpp
@@ -414,7 +403,7 @@ if ENABLE_ZMQ
414403
qt_dogecoin_qt_LDADD += $(LIBDOGECOIN_ZMQ) $(ZMQ_LIBS)
415404
endif
416405
qt_dogecoin_qt_LDADD += $(LIBDOGECOIN_CLI) $(LIBDOGECOIN_COMMON) $(LIBDOGECOIN_UTIL) $(LIBDOGECOIN_CONSENSUS) $(LIBDOGECOIN_CRYPTO) $(LIBUNIVALUE) $(LIBLEVELDB) $(LIBMEMENV) \
417-
$(BOOST_LIBS) $(QT_LIBS) $(QT_DBUS_LIBS) $(QR_LIBS) $(PROTOBUF_LIBS) $(BDB_LIBS) $(SSL_LIBS) $(CRYPTO_LIBS) $(MINIUPNPC_LIBS) $(LIBSECP256K1) \
406+
$(BOOST_LIBS) $(QT_LIBS) $(QT_DBUS_LIBS) $(QR_LIBS) $(BDB_LIBS) $(SSL_LIBS) $(CRYPTO_LIBS) $(MINIUPNPC_LIBS) $(LIBSECP256K1) \
418407
$(EVENT_PTHREADS_LIBS) $(EVENT_LIBS)
419408
qt_dogecoin_qt_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(QT_LDFLAGS) $(LIBTOOL_APP_LDFLAGS)
420409
qt_dogecoin_qt_LIBTOOLFLAGS = --tag CXX
@@ -445,7 +434,7 @@ $(QT_QRC_LOCALE_CPP): $(QT_QRC_LOCALE) $(QT_QM)
445434
$(SED) -e '/^\*\*.*Created:/d' -e '/^\*\*.*by:/d' > $@
446435
@rm $(@D)/temp_$(<F)
447436

448-
$(QT_QRC_CPP): $(QT_QRC) $(QT_FORMS_H) $(RES_ICONS) $(RES_IMAGES) $(RES_MOVIES) $(RES_FONTS) $(PROTOBUF_H)
437+
$(QT_QRC_CPP): $(QT_QRC) $(QT_FORMS_H) $(RES_ICONS) $(RES_IMAGES) $(RES_MOVIES) $(RES_FONTS)
449438
@test -f $(RCC)
450439
$(AM_V_GEN) QT_SELECT=$(QT_SELECT) $(RCC) -name bitcoin $< | \
451440
$(SED) -e '/^\*\*.*Created:/d' -e '/^\*\*.*by:/d' > $@

src/Makefile.qttest.include

+3-16
Original file line numberDiff line numberDiff line change
@@ -6,34 +6,21 @@ bin_PROGRAMS += qt/test/test_dogecoin-qt
66
TESTS += qt/test/test_dogecoin-qt
77

88
TEST_QT_MOC_CPP = \
9-
qt/test/moc_compattests.cpp \
109
qt/test/moc_rpcnestedtests.cpp \
1110
qt/test/moc_uritests.cpp
1211

13-
if ENABLE_WALLET
14-
TEST_QT_MOC_CPP += qt/test/moc_paymentservertests.cpp
15-
endif
16-
1712
TEST_QT_H = \
18-
qt/test/compattests.h \
1913
qt/test/rpcnestedtests.h \
20-
qt/test/uritests.h \
21-
qt/test/paymentrequestdata.h \
22-
qt/test/paymentservertests.h
14+
qt/test/uritests.h
2315

2416
qt_test_test_dogecoin_qt_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) $(BITCOIN_QT_INCLUDES) \
25-
$(QT_INCLUDES) $(QT_TEST_INCLUDES) $(PROTOBUF_CFLAGS)
17+
$(QT_INCLUDES) $(QT_TEST_INCLUDES)
2618

2719
qt_test_test_dogecoin_qt_SOURCES = \
28-
qt/test/compattests.cpp \
2920
qt/test/rpcnestedtests.cpp \
3021
qt/test/test_main.cpp \
3122
qt/test/uritests.cpp \
3223
$(TEST_QT_H)
33-
if ENABLE_WALLET
34-
qt_test_test_dogecoin_qt_SOURCES += \
35-
qt/test/paymentservertests.cpp
36-
endif
3724

3825
nodist_qt_test_test_dogecoin_qt_SOURCES = $(TEST_QT_MOC_CPP)
3926

@@ -46,7 +33,7 @@ qt_test_test_dogecoin_qt_LDADD += $(LIBDOGECOIN_ZMQ) $(ZMQ_LIBS)
4633
endif
4734
qt_test_test_dogecoin_qt_LDADD += $(LIBDOGECOIN_CLI) $(LIBDOGECOIN_COMMON) $(LIBDOGECOIN_UTIL) $(LIBDOGECOIN_CONSENSUS) $(LIBDOGECOIN_CRYPTO) $(LIBUNIVALUE) $(LIBLEVELDB) \
4835
$(LIBMEMENV) $(BOOST_LIBS) $(QT_DBUS_LIBS) $(QT_TEST_LIBS) $(QT_LIBS) \
49-
$(QR_LIBS) $(PROTOBUF_LIBS) $(BDB_LIBS) $(SSL_LIBS) $(CRYPTO_LIBS) $(MINIUPNPC_LIBS) $(LIBSECP256K1) \
36+
$(QR_LIBS) $(BDB_LIBS) $(SSL_LIBS) $(CRYPTO_LIBS) $(MINIUPNPC_LIBS) $(LIBSECP256K1) \
5037
$(EVENT_PTHREADS_LIBS) $(EVENT_LIBS)
5138
qt_test_test_dogecoin_qt_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(QT_LDFLAGS) $(LIBTOOL_APP_LDFLAGS)
5239
qt_test_test_dogecoin_qt_CXXFLAGS = $(AM_CXXFLAGS) $(QT_PIE_FLAGS)

src/init.cpp

-1
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,6 @@ std::string HelpMessage(HelpMessageMode mode)
373373
strUsage += HelpMessageOpt("-discover", _("Discover own IP addresses (default: 1 when listening and no -externalip or -proxy)"));
374374
strUsage += HelpMessageOpt("-dns", _("Allow DNS lookups for -addnode, -seednode and -connect") + " " + strprintf(_("(default: %u)"), DEFAULT_NAME_LOOKUP));
375375
strUsage += HelpMessageOpt("-dnsseed", _("Query for peer addresses via DNS lookup, if low on addresses (default: 1 unless -connect/-noconnect)"));
376-
strUsage += HelpMessageOpt("-enable-bip70", _("Enable BIP-70 PaymentServer (default: 0)"));
377376
strUsage += HelpMessageOpt("-externalip=<ip>", _("Specify your own public address"));
378377
strUsage += HelpMessageOpt("-forcednsseed", strprintf(_("Always query for peer addresses via DNS lookup (default: %u)"), DEFAULT_FORCEDNSSEED));
379378
strUsage += HelpMessageOpt("-listen", _("Accept connections from outside (default: 1 if no -proxy or -connect/-noconnect)"));

src/qt/bitcoin.cpp

+1-17
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@
5252
#include <QThread>
5353
#include <QTimer>
5454
#include <QTranslator>
55-
#include <QSslConfiguration>
5655

5756
#if defined(QT_STATICPLUGIN)
5857
#include <QtPlugin>
@@ -348,7 +347,7 @@ BitcoinApplication::~BitcoinApplication()
348347
#ifdef ENABLE_WALLET
349348
void BitcoinApplication::createPaymentServer()
350349
{
351-
paymentServer = new PaymentServer(this, true, GetBoolArg("-enable-bip70", false));
350+
paymentServer = new PaymentServer(this, true);
352351
}
353352
#endif
354353

@@ -474,14 +473,6 @@ void BitcoinApplication::initializeResult(int retval)
474473
#ifdef ENABLE_WALLET
475474
paymentServer->setOptionsModel(optionsModel);
476475

477-
if(GetBoolArg("-enable-bip70", false))
478-
{
479-
PaymentServer::LoadRootCAs();
480-
if(pwalletMain)
481-
connect(walletModel, SIGNAL(coinsSent(CWallet*,SendCoinsRecipient,QByteArray)),
482-
paymentServer, SLOT(fetchPaymentACK(CWallet*,const SendCoinsRecipient&,QByteArray)));
483-
}
484-
485476
// Now that initialization/startup is done, process any command-line
486477
// payment requests:
487478
connect(paymentServer, SIGNAL(receivedPaymentRequest(SendCoinsRecipient)),
@@ -543,13 +534,6 @@ MAIN_FUNCTION
543534
#ifdef Q_OS_MAC
544535
QApplication::setAttribute(Qt::AA_DontShowIconsInMenus);
545536
#endif
546-
#if QT_VERSION >= 0x050500
547-
// Because of the POODLE attack it is recommended to disable SSLv3 (https://disablessl3.com/),
548-
// so set SSL protocols to TLS1.0+.
549-
QSslConfiguration sslconf = QSslConfiguration::defaultConfiguration();
550-
sslconf.setProtocol(QSsl::TlsV1_0OrLater);
551-
QSslConfiguration::setDefaultConfiguration(sslconf);
552-
#endif
553537

554538
BitcoinApplication app;
555539

src/qt/coincontroldialog.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
#include "txmempool.h"
1515
#include "walletmodel.h"
1616

17+
#include "base58.h"
1718
#include "wallet/coincontrol.h"
1819
#include "init.h"
1920
#include "policy/policy.h"

src/qt/guiutil.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
#include "qvalidatedlineedit.h"
1212
#include "walletmodel.h"
1313

14+
#include "base58.h"
1415
#include "primitives/transaction.h"
1516
#include "init.h"
1617
#include "policy/policy.h"

src/qt/optionsmodel.cpp

-19
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
#include "wallet/walletdb.h"
2727
#endif
2828

29-
#include <QNetworkProxy>
3029
#include <QSettings>
3130
#include <QStringList>
3231

@@ -445,24 +444,6 @@ void OptionsModel::setDisplayUnit(const QVariant &value)
445444
}
446445
}
447446

448-
bool OptionsModel::getProxySettings(QNetworkProxy& proxy) const
449-
{
450-
// Directly query current base proxy, because
451-
// GUI settings can be overridden with -proxy.
452-
proxyType curProxy;
453-
if (GetProxy(NET_IPV4, curProxy)) {
454-
proxy.setType(QNetworkProxy::Socks5Proxy);
455-
proxy.setHostName(QString::fromStdString(curProxy.proxy.ToStringIP()));
456-
proxy.setPort(curProxy.proxy.GetPort());
457-
458-
return true;
459-
}
460-
else
461-
proxy.setType(QNetworkProxy::NoProxy);
462-
463-
return false;
464-
}
465-
466447
void OptionsModel::setRestartRequired(bool fRequired)
467448
{
468449
QSettings settings;

src/qt/paymentrequest.proto

-49
This file was deleted.

0 commit comments

Comments
 (0)