aboutsummaryrefslogtreecommitdiff
path: root/src/qt/paymentserver.cpp
AgeCommit message (Collapse)Author
2015-04-15[Qt] paymentserver: do not log NULL certificatesPhilip Kaufmann
- also add a few more comments in PaymentServer::LoadRootCAs
2015-03-24Includes: Do not include main.h from any other headerJorge Timón
2015-03-12[Move Only] Move wallet related things to src/wallet/Jonas Schnelli
could once be renamed from /src/wallet to /src/legacywallet.
2015-02-15openssl: abstract out OPENSSL_cleanseCory Fields
This makes it easier for us to replace it if desired, since it's now only in one spot. Also, it avoids the openssl include from allocators.h, which essentially forced openssl to be included from every compilation unit.
2015-02-04[Qt] prevent amount overflow problem with payment requestsPhilip Kaufmann
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
2015-01-31Remove whitespaces before double colon in errors and logsPavel Janík
2015-01-29Merge pull request #5620Wladimir J. van der Laan
6715efb [Qt] Payment request expiration bug fix (re-done) (Philip Kaufmann)
2015-01-15[Qt] add debug logging for -rootcertificates optionPhilip Kaufmann
- now logs if -rootcertificates="" was used to disable payment request authentication via X.509 certificates - also logs which file is used as trusted root cert, if -rootcertificates is set
2015-01-15[Qt] Payment request expiration bug fix (re-done)Philip Kaufmann
- 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
2015-01-14[Qt] add payment request unit test for non matching networksPhilip Kaufmann
- 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
2015-01-02namespace: remove boost namespace pollutionCory Fields
2014-12-31[Qt] update a translation string and argument countsPhilip Kaufmann
2014-12-19Added "Core" to copyright headerssandakersmann
Github-Pull: #5494 Rebased-From: 15de949bb9277e442302bdd8dee299a8d6deee60
2014-12-08[Qt] update paymentserver license and cleanup orderingPhilip Kaufmann
2014-12-08[Qt] add BIP70 payment request size DoS protection for URIsPhilip Kaufmann
- current code only does this for payment request files, which are used on Mac - also rename readPaymentRequest to readPaymentRequestFromFile, so it's obvious that function only handles payment request files and not URIs - small logging changes in readPaymentRequestFromFile
2014-12-08[Qt] remove dup lock that is done in SetAddressBook()Philip Kaufmann
2014-12-08[Qt] ensure socket is set to NULL in PaymentServer::ipcSendCommandLinePhilip Kaufmann
2014-12-08[Qt] add BIP70/BIP71 constants for all messages and mime typesPhilip Kaufmann
- also rename current ones to match the new ones - remove constant from guiconstant.h and add it to paymentserver.cpp
2014-12-08[Qt] make PaymentServer::ipcParseCommandLine voidPhilip Kaufmann
- the function only returned true, so make it void - add a comment about payment request network detection
2014-09-26Use a typedef for monetary valuesMark Friedenbach
2014-09-16Move CTxDestination from script/script to script/standardPieter Wuille
2014-09-10Merge pull request #4623Wladimir J. van der Laan
e84843c Broken addresses on command line no longer trigger testnet. (Ross Nicoll)
2014-08-30Broken addresses on command line no longer trigger testnet.Ross Nicoll
When passing a bitcoin: URI on the command line, invalid addresses do not incorrectly send the user to the test network.
2014-08-26Split up util.cpp/hWladimir J. van der Laan
Split up util.cpp/h into: - string utilities (hex, base32, base64): no internal dependencies, no dependency on boost (apart from foreach) - money utilities (parsesmoney, formatmoney) - time utilities (gettime*, sleep, format date): - and the rest (logging, argument parsing, config file parsing) The latter is basically the environment and OS handling, and is stripped of all utility functions, so we may want to rename it to something else than util.cpp/h for clarity (Matt suggested osinterface). Breaks dependency of sha256.cpp on all the things pulled in by util.
2014-08-04qt: Demote ReportInvalidCertificate message to qDebugWladimir J. van der Laan
Too spammy.
2014-07-31qt: Update some messages after suggestions by translatorsWladimir J. van der Laan
- *cannot* is more common, thus preferred to *can not* - Use *Watch-only* instead of *Watchonly* as one word
2014-07-08Payment request parsing on startup now only changes network if a valid ↵Ross Nicoll
network name is specified.
2014-07-07remove SOCKS4 support from core and GUIPhilip Kaufmann
- now we support SOCKS5 only
2014-07-03Move fee policy out of coreGavin Andresen
2014-07-02qt: fix 'opens in testnet mode when presented with a BIP-72 link with no ↵Julian Haight
fallback' Passes tests: ``` $ ./bitcoin-qt 'bitcoin:?r=http://www.example.com/' .. fixed the original problem - this launches mainnet. $ ./bitcoin-qt 'bitcoin:mngeNQbTKnmaMbx8EXCYdwUbnt9JJD52cC' .. launches testnet $ ./bitcoin-qt -testnet 'bitcoin:1NXXeQRyMFFFRfyUix2o7mk1vhvk2Nxp78' .. sanity check - launches mainnet. ``` Fixes #4355. Closes #4411.
2014-07-01qt: Change serious messages from qDebug to qWarningWladimir J. van der Laan
By changing the logging stream for warnings from qDebug to qWarning, these will always be logged to debug.log.
2014-06-25Remove unnecessary dependencies for bitcoin-cliWladimir J. van der Laan
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.
2014-06-16Remove `using namespace std` from header fileWladimir J. van der Laan
It's considered bad form to import things into the global namespace in a header. Put it in the cpp files where it is needed instead.
2014-06-12add NetworkIDString() to chainparamsPhilip Kaufmann
- returns the BIP70 network string - use that new function in the core and GUI code and remove unused code and functions
2014-06-09Merge pull request #3824Wladimir J. van der Laan
f0a83fc Use Params().NetworkID() instead of TestNet() from the payment protocol (jtimon) 2871889 net.h was using std namespace through chainparams.h included in protocol.h (jtimon) c8c52de Replace virtual methods with static attributes, chainparams.h depends on protocol.h instead of the other way around (jtimon) a3d946e Get rid of TestNet() (jtimon) 6fc0fa6 Add RPCisTestNet chain parameter (jtimon) cfeb823 Add RequireStandard chain parameter (jtimon) 21913a9 Add AllowMinDifficultyBlocks chain parameter (jtimon) d754f34 Move majority constants to chainparams (jtimon) 8d26721 Get rid of RegTest() (jtimon) cb9bd83 Add DefaultCheckMemPool chain parameter (jtimon) 2595b9a Add DefaultMinerThreads chain parameter (jtimon) bfa9a1a Add MineBlocksOnDemand chain parameter (jtimon) 1712adb Add MiningRequiresPeers chain parameter (jtimon)
2014-06-06Type-safe CFeeRate classGavin Andresen
Use CFeeRate instead of an int64_t for quantities that are fee-per-size. Helps prevent unit-conversion mismatches between the wallet, relaying, and mining code.
2014-06-04Use Params().NetworkID() instead of TestNet() from the payment protocoljtimon
2014-05-06[Qt] ensure payment request network matches client networkPhilip Kaufmann
- replaces checks in SendCoinsDialog::handlePaymentRequest() that belong to PaymentServer (normal URIs are special cased, as only an isValid check is done on BTC addresses) - prevents the client to handle payment requests that do not match the clients network and shows an error instead (mainly a problem with drag&drop payment requests onto the client window) - includes some small comment changes also
2014-01-17[Qt] let OptionsModel::getProxySettings() directly query proxyPhilip Kaufmann
- as a proxy set via GUI can be overridden via -proxy, directly query the core to get active proxy - give a warning, if active proxy is not SOCKS5 (needs to be SOCKS5 for the Qt networking code to work) - also remove an obsolete connect() call from optionsdialog.cpp and a reference to Bitcoin-Qt (now just GUI)
2014-01-14[Qt] small paymentserver header cleanupPhilip Kaufmann
2014-01-13Merge pull request #3374Wladimir J. van der Laan
bd70562 [Qt] add messages when handling local payment request files (Philip Kaufmann)
2014-01-10Merge pull request #3488Wladimir J. van der Laan
2102ab9 ui: Fix GUI initialization order (Wladimir J. van der Laan)
2014-01-06qt: protect SetAddressBook with cs_wallet lock everywhereWladimir J. van der Laan
2014-01-05ui: Fix GUI initialization orderWladimir J. van der Laan
Fixes at least #3478. Splits and documents the phases: 1. Parse command-line options. These take precedence over anything else. 2. Basic Qt initialization (not dependent on parameters or configuration) 3. Application identification 4. Initialization of translations 5. Now that settings and translations are available, ask user for data directory 6. Determine availability of data directory and parse bitcoin.conf 7. URI IPC sending 8. Main GUI initialization Splits command line parsing logic from ipcSendCommandLine into ipcParseCommandLine, as isTestNet() can only be overridden in the early stages before choosing a data directory. Sending however needs to happen after choosing a data directory.
2013-12-10[Qt] add messages when handling local payment request filesPhilip Kaufmann
- important for the open URI dialog to give users feedback when a file is invalid etc.
2013-12-06[Qt] misc PaymentServer changes (e.g. changes to eventFilter())Philip Kaufmann
- 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
2013-12-04Payment request URI syntax changed, from request=... to r=...Gavin Andresen
BIP 72 was changed to save six bytes in bitcoin: URIs.
2013-11-11[Qt] paymentserver: start netManager in uiReady()Philip Kaufmann
- 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
2013-11-10Cleanup code using forward declarations.Brandon Dahler
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.
2013-11-06Merge pull request #3145Wladimir J. van der Laan
395d0d5 rework an ugly hack in processPaymentRequest() (Philip Kaufmann) 952d2cd make processPaymentRequest() use a single SendCoinsRecipient (Philip Kaufmann) 983cef4 payment-request UI: use SendCoinsRecipient.message for memo (Philip Kaufmann) c6c97e0 [Qt] Rework of payment request UI (mainly for insecure pr) (Philip Kaufmann)