aboutsummaryrefslogtreecommitdiff
path: root/src/qt/test/paymentservertests.cpp
Commit message (Collapse)AuthorAgeFilesLines
* really s/Doge/Dis/g this timeTomo Ueda2021-09-021-2/+2
|
* qt-tests: Disable payment server test that moves 21M+1 coins.Patrick Lodder2020-07-221-0/+3
| | | | | | This is not a testcase for Dogecoin. Like the other payment server tests, this could be amended, or it can be depreciated, depending on where we take payment protocol.
* Update payment protocol to match Dogecoin (#1433)Ross Nicoll2018-09-191-2/+4
| | | | | | * Revised payment request handling to use genesis block hash instead of network name, enabling support for more networks that just Bitcoin main and test net. * Disable payment protocol certificate unit tests; we don't modify this code, and regenerating the test data is likely to be significantly time consuming. Will re-enable once discussion on spec is concluded.
* Bump copyright headers to 2015MarcoFalke2015-12-131-1/+1
|
* [Qt] add verifySize() function to PaymentServerPhilip Kaufmann2015-08-101-1/+2
| | | | | | | - add static verifySize() function to PaymentServer and move the logging on error into the function - also use the new function in the unit test - the function checks if the size is allowed as per BIP70
* qt: define QT_NO_KEYWORDSWladimir J. van der Laan2015-07-151-1/+1
| | | | | | | | QT_NO_KEYWORDS prevents Qt from defining the `foreach`, `signals`, `slots` and `emit` macros. Avoid overlap between Qt macros and boost - for example #undef hackiness in #6421.
* [Qt] prevent amount overflow problem with payment requestsPhilip Kaufmann2015-02-041-0/+17
| | | | | | | | | | | | | | | | Bitcoin amounts are stored as uint64 in the protobuf messages (see paymentrequest.proto), but CAmount is defined as int64_t. Because of that we need to verify that single and accumulated amounts are in a valid range and no variable overflow has happened. - fixes #5624 (#5622) Thanks @SergioDemianLerner for reporting that issue and also supplying us with a possible solution. - add static verifyAmount() function to PaymentServer and move the logging on error into the function - also add a unit test to paymentservertests.cpp
* [Qt] Payment request expiration bug fix (re-done)Philip Kaufmann2015-01-151-2/+32
| | | | | | | | | | | | | | | - this is based on #4122 (which can be closed) Currently a payment request is only checked for expiration upon receipt. It should be checked again immediately before sending coins to prevent the user from paying to an expired invoice which would then require a customer service interaction. - add static verifyExpired() function to PaymentServer to be able to use the same validation code in GUI and unit-testing code - extend unit tests to use that function and also add an unit test which overflows, because payment requests allow expires as uint64, whereas we use int64_t for verification of expired payment requests
* [Qt] add payment request unit test for non matching networksPhilip Kaufmann2015-01-141-0/+28
| | | | | | - verify that payment request network matches client network - add static verifyNetwork() function to PaymentServer to be able to use the same validation code in GUI and unit-testing code
* [Qt] prepare paymentservertests for new unit testsPhilip Kaufmann2015-01-131-11/+17
| | | | | | | | | | - add a second PaymentRequest Test CA certificate to paymentrequestdata.h (serial number f0:da:97:e4:38:d7:64:16) as caCert2_BASE64 - rename existing Test CA certificate to caCert1_BASE64 - rename existing payment request data to know they belong to caCert1_BASE64 - update comments to reflect the changes and add a missing comment to one of the payment requests
* Added "Core" to copyright headerssandakersmann2014-12-191-1/+1
| | | | | Github-Pull: #5494 Rebased-From: 15de949bb9277e442302bdd8dee299a8d6deee60
* [Qt] add BIP70 DoS protection testPhilip Kaufmann2014-12-081-0/+12
| | | | | - this test required to make readPaymentRequestFromFile() public in order to be able to is it in paymentservertests.cpp
* script: add a slew of includes all around and drop includes from script.hCory Fields2014-10-171-0/+1
| | | | Lots of files ended up with indirect includes from script.h.
* [Qt] copyright, style and indentation cleanup of Qt testsPhilip Kaufmann2014-09-051-3/+6
|
* Remove unnecessary dependencies for bitcoin-cliWladimir J. van der Laan2014-06-251-0/+1
| | | | | | | | | This commit removes all the unnecessary dependencies (key, core, netbase, sync, ...) from bitcoin-cli. To do this it shards the chain parameters into BaseParams, which contains just the RPC port and data directory (as used by utils and bitcoin-cli) and Params, with the rest.
* [Qt] misc PaymentServer changes (e.g. changes to eventFilter())Philip Kaufmann2013-12-061-6/+8
| | | | | | | | | | | | - make eventFilter() private and pass events on to QObject::eventFilter() instead of just returning false - re-work paymentservertest.cpp to correctly handle the event test after the above change (rewrite test_main to allow usage of QCoreApplication:: in the tests) - delete socket when we were unable to connect in ipcSendCommandLine() - show a message to the user if we fail to start-up (instead of just a debug.log entry) - misc small comment changes
* [Qt] paymentserver: start netManager in uiReady()Philip Kaufmann2013-11-111-1/+0
| | | | | | | | | | - remove explicit init of netManager as this is done in the constructor anyway - move initNetManager() call to uiReady(), which removes an assert() and allows us to use message() in initNetManager() (currently unused but could be necessary because of proxy related messages) - make initNetManager() private - update paymentservertests.cpp
* Cleanup code using forward declarations.Brandon Dahler2013-11-101-9/+9
| | | | | | | | | Use misc methods of avoiding unnecesary header includes. Replace int typedefs with int##_t from stdint.h. Replace PRI64[xdu] with PRI[xdu]64 from inttypes.h. Normalize QT_VERSION ifs where possible. Resolve some indirect dependencies as direct ones. Remove extern declarations from .cpp files.
* autotools: switch to autotools buildsystemCory Fields2013-09-051-0/+1
|
* Bitcoin-Qt: fixes for using display unit from optionsPhilip Kaufmann2013-08-291-1/+2
| | | | | | | - extend PaymentServer with setOptionsModel() and rework initNetManager() to make use of that - fix all other places in the code to use display unit from options and no hard-coded unit
* Payment Protocol: X509-validated payment requestsGavin Andresen2013-08-221-0/+109
Add support for a Payment Protocol to Bitcoin-Qt. Payment messages are protocol-buffer encoded and communicated over http(s), so this adds a dependency on the Google protocol buffer library, and requires Qt with OpenSSL support.