diff options
author | Philip Kaufmann <phil.kaufmann@t-online.de> | 2014-12-05 09:39:23 +0100 |
---|---|---|
committer | Philip Kaufmann <phil.kaufmann@t-online.de> | 2014-12-08 16:09:01 +0100 |
commit | 4333e26c8e89e3d02cfb4d3464108b1a15175e2b (patch) | |
tree | 276eb63f3dfbf3b865f38be5a376ed5bb6fd6031 /src/qt/paymentserver.h | |
parent | 31f84944a5f6f1aa07e36e7700e9ab16be88aa42 (diff) |
[Qt] add BIP70 DoS protection test
- this test required to make readPaymentRequestFromFile() public in order
to be able to is it in paymentservertests.cpp
Diffstat (limited to 'src/qt/paymentserver.h')
-rw-r--r-- | src/qt/paymentserver.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/qt/paymentserver.h b/src/qt/paymentserver.h index 9acd99723c..42940664ec 100644 --- a/src/qt/paymentserver.h +++ b/src/qt/paymentserver.h @@ -52,6 +52,9 @@ QT_END_NAMESPACE class CWallet; +// BIP70 max payment request size in bytes (DoS protection) +extern const qint64 BIP70_MAX_PAYMENTREQUEST_SIZE; + class PaymentServer : public QObject { Q_OBJECT @@ -85,6 +88,9 @@ public: // OptionsModel is used for getting proxy settings and display unit void setOptionsModel(OptionsModel *optionsModel); + // This is now public, because we use it in paymentservertests.cpp + static bool readPaymentRequestFromFile(const QString& filename, PaymentRequestPlus& request); + signals: // Fired when a valid payment request is received void receivedPaymentRequest(SendCoinsRecipient); @@ -118,7 +124,6 @@ protected: bool eventFilter(QObject *object, QEvent *event); private: - static bool readPaymentRequestFromFile(const QString& filename, PaymentRequestPlus& request); bool processPaymentRequest(PaymentRequestPlus& request, SendCoinsRecipient& recipient); void fetchRequest(const QUrl& url); |