aboutsummaryrefslogtreecommitdiff
path: root/src/qt/paymentserver.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Split up util.cpp/hWladimir J. van der Laan2014-08-261-0/+1
| | | | | | | | | | | | | | | | 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.
* qt: Demote ReportInvalidCertificate message to qDebugWladimir J. van der Laan2014-08-041-1/+1
| | | | Too spammy.
* qt: Update some messages after suggestions by translatorsWladimir J. van der Laan2014-07-311-3/+3
| | | | | - *cannot* is more common, thus preferred to *can not* - Use *Watch-only* instead of *Watchonly* as one word
* Payment request parsing on startup now only changes network if a valid ↵Ross Nicoll2014-07-081-1/+5
| | | | network name is specified.
* remove SOCKS4 support from core and GUIPhilip Kaufmann2014-07-071-10/+4
| | | | - now we support SOCKS5 only
* Move fee policy out of coreGavin Andresen2014-07-031-1/+1
|
* qt: fix 'opens in testnet mode when presented with a BIP-72 link with no ↵Julian Haight2014-07-021-1/+1
| | | | | | | | | | | | | | | | | | | 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.
* qt: Change serious messages from qDebug to qWarningWladimir J. van der Laan2014-07-011-12/+12
| | | | | By changing the logging stream for warnings from qDebug to qWarning, these will always be logged to debug.log.
* Remove unnecessary dependencies for bitcoin-cliWladimir J. van der Laan2014-06-251-4/+4
| | | | | | | | | 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.
* Remove `using namespace std` from header fileWladimir J. van der Laan2014-06-161-0/+1
| | | | | 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.
* add NetworkIDString() to chainparamsPhilip Kaufmann2014-06-121-12/+1
| | | | | | - returns the BIP70 network string - use that new function in the core and GUI code and remove unused code and functions
* Merge pull request #3824Wladimir J. van der Laan2014-06-091-2/+12
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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)
| * Use Params().NetworkID() instead of TestNet() from the payment protocoljtimon2014-06-041-2/+12
| |
* | Type-safe CFeeRate classGavin Andresen2014-06-061-1/+1
|/ | | | | | | | 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.
* [Qt] ensure payment request network matches client networkPhilip Kaufmann2014-05-061-21/+60
| | | | | | | | | | - 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
* [Qt] let OptionsModel::getProxySettings() directly query proxyPhilip Kaufmann2014-01-171-10/+15
| | | | | | | | | - 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)
* [Qt] small paymentserver header cleanupPhilip Kaufmann2014-01-141-2/+0
|
* Merge pull request #3374Wladimir J. van der Laan2014-01-131-16/+36
|\ | | | | | | bd70562 [Qt] add messages when handling local payment request files (Philip Kaufmann)
| * [Qt] add messages when handling local payment request filesPhilip Kaufmann2013-12-101-16/+36
| | | | | | | | | | - important for the open URI dialog to give users feedback when a file is invalid etc.
* | Merge pull request #3488Wladimir J. van der Laan2014-01-101-3/+12
|\ \ | | | | | | | | | 2102ab9 ui: Fix GUI initialization order (Wladimir J. van der Laan)
| * | ui: Fix GUI initialization orderWladimir J. van der Laan2014-01-051-3/+12
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* / qt: protect SetAddressBook with cs_wallet lock everywhereWladimir J. van der Laan2014-01-061-0/+1
|/
* [Qt] misc PaymentServer changes (e.g. changes to eventFilter())Philip Kaufmann2013-12-061-7/+14
| | | | | | | | | | | | - 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
* Payment request URI syntax changed, from request=... to r=...Gavin Andresen2013-12-041-2/+2
| | | | BIP 72 was changed to save six bytes in bitcoin: URIs.
* [Qt] paymentserver: start netManager in uiReady()Philip Kaufmann2013-11-111-1/+1
| | | | | | | | | | - 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-20/+24
| | | | | | | | | 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.
* Merge pull request #3145Wladimir J. van der Laan2013-11-061-51/+41
|\ | | | | | | | | | | | | 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)
| * rework an ugly hack in processPaymentRequest()Philip Kaufmann2013-10-311-6/+3
| | | | | | | | | | - use a QStringList to store valid addresses and format them for GUI and debug.log usage via .join()
| * make processPaymentRequest() use a single SendCoinsRecipientPhilip Kaufmann2013-10-311-22/+17
| | | | | | | | | | - as one this pulls main purpose is to change a payment request to be displayed as a single sendcoins entry
| * payment-request UI: use SendCoinsRecipient.message for memoPhilip Kaufmann2013-10-311-1/+1
| |
| * [Qt] Rework of payment request UI (mainly for insecure pr)Philip Kaufmann2013-10-311-38/+36
| | | | | | | | | | | | | | | | | | | | - this shows insecure (unsecured) payment requests in a new yellowish colored UI (based on the secure payment request UI) instead of our normal payment UI - allows us to receive paymentACK messages for insecure payment requests - allows us to handle expirations for insecure payment request - changed walletmodel, so that all types of payment requests don't touch the addressbook
* | qt: add license header to source filesWladimir J. van der Laan2013-11-041-1/+1
|/ | | | Closes #839
* re-work -debug switch handlingPhilip Kaufmann2013-10-301-11/+5
| | | | | | | | | | | | - re-work -debug help message text - make -debug log every debugging information again (even all categories) - remove unneeded fDebug checks in front of LogPrint()/qDebug(), as that check is done in LogPrintf() when category is != NULL (true for all LogPrint() calls - remove fDebug ONLY in code which is NOT performance-critical - harmonize addrman category name - deprecate -debugnet usage, should be used via -debug=net and remove the corresponding global
* Merge pull request #3130 from Diapolo/paymentACK_via_messageWladimir J. van der Laan2013-10-251-9/+20
|\ | | | | Qt: move paymentACK handling to paymentserver
| * Qt: move paymentACK handling to paymentserverPhilip Kaufmann2013-10-241-9/+20
| | | | | | | | | | | | | | | | | | - add new slot handlePaymentACK() to paymentserver, which handles paymentACK messages (currently we just display them) - make paymentACK message a modal information dialog - change some QObject::tr() to just tr() - clarify the processPaymentRequest() error, when IsDust() - small string change to prevent a tripple + usage with QString
* | paymentserver: init all class members in constructorPhilip Kaufmann2013-10-241-1/+6
|/
* Merge pull request #3119Pieter Wuille2013-10-201-1/+1
|\ | | | | | | db0e8cc Bump Year Number to 2013 (super3)
| * Bump Year Number to 2013super32013-10-201-1/+1
| |
* | paymentserver: style fixes / cleanupPhilip Kaufmann2013-10-191-22/+30
| | | | | | | | | | | | | | | | - rename reportError() into message() to be in line with our default message() signal/slot naming (and can be used for all types of messages) - rename some QStrings to not collide with message() function - add a missing message for malformed URIs that IS also used in BitcoinGUI - fix / extend some comments and misc style fixes
* | paymentserver: use own HTML-esc / add new header constPhilip Kaufmann2013-10-111-6/+3
|/ | | | | | | - make processPaymentRequest() use our own HTML-escaping function from GUIUtil - make string "application/bitcoin-payment" a constant (below similar constant strings in the .cpp file)
* fix some cosmetic glitches in the codebasePhilip Kaufmann2013-09-091-24/+17
| | | | | | | | | | | - rename URL into URI in paymentserver where correct - add some missing Qt-coding-stuff in paymentserver - change QSpinBox to QLineEdit as base for BitcoinAmountField in .ui files (as this is the result when converting the BAF back into base) - remove some c_str() and replace with QString::fromStdString() - remove several new-lines - remove unneeded spaces - indentation fixes
* Bitcoin-Qt: Use qDebug() for printing to debug.logPhilip Kaufmann2013-09-061-17/+21
| | | | | - removes all usages of PrintDebugStringF from Qt code - ensure same format for all debug.log messages "functionname : Message"
* Merge pull request #2944 from gavinandresen/acceptheaderGavin Andresen2013-09-031-0/+4
|\ | | | | Set Accept: application/bitcoin-paymentrequest header
| * Set Accept: application/bitcoin-paymentrequest headerGavin Andresen2013-08-281-0/+4
| | | | | | | | | | Suggestion from BitPay: set an Accept: HTTP header when fetching payment requests / payment ACKs.
* | Bitcoin-Qt: fixes for using display unit from optionsPhilip Kaufmann2013-08-291-6/+16
| | | | | | | | | | | | | | - 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
* | Remove fAllowReuse from GetKeyFromPool.Gregory Maxwell2013-08-231-1/+1
|/ | | | With the GUI password fix this was always false.
* Payment Protocol: X509-validated payment requestsGavin Andresen2013-08-221-36/+491
| | | | | | | | 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.
* Remove #define loop from util.hGavin Andresen2013-07-311-1/+0
| | | | | Replace the loop macro with while (true). The #define caused problems for Qt.
* Bitcoin-Qt: fix QApplication includes to match our include defaultsPhilip Kaufmann2013-07-231-2/+2
| | | | | - move all QApplication includes to top of included Qt headers - undef our loop macro where it would cause compilation errors otherwise
* Qt5 compatibilityWladimir J. van der Laan2013-06-011-0/+2
| | | | | | | | | | | | This commit squashes all the changes in the Qt5 branch relative to master. Backward compatibility with Qt4 is retained. Original authors: - Philip Kaufmann <[email protected]> - Jonas Schnelli <[email protected]>