aboutsummaryrefslogtreecommitdiff
path: root/src/bitcoin-cli.cpp
Commit message (Collapse)AuthorAgeFilesLines
* bitcoin-cli.cpp: Use symbolic constant for exit codePuru2016-05-021-1/+1
|
* rpc: Input-from-stdin mode for bitcoin-cliWladimir J. van der Laan2016-02-241-9/+12
| | | | | | | | | | | | Implements #7442 by adding an option `-stdin` which reads additional arguments from stdin, one per line. For example ```bash echo -e "mysecretcode\n120" | src/bitcoin-cli -stdin walletpassphrase echo -e "walletpassphrase\nmysecretcode\n120" | src/bitcoin-cli -stdin ```
* Merge branch 'master' into single_prodnameLuke Dashjr2016-02-031-7/+8
|\
| * move rpc* to rpc/Daniel Cousens2016-01-211-2/+2
| |
| * Bump copyright headers to 2015MarcoFalke2015-12-131-1/+1
| |
| * Constrain rpcport default values to a single location in codeLuke Dashjr2015-12-011-1/+1
| |
| * Constrain constant values to a single location in codeLuke Dashjr2015-11-281-3/+4
| |
* | Unify package name to as few places as possible without major changesLuke Dashjr2015-12-141-2/+6
|/
* constify missing catch casesPhilip Kaufmann2015-10-271-1/+1
| | | | - ensure all missing catch cases are constant where possible
* Merge pull request #6846Wladimir J. van der Laan2015-10-221-1/+1
|\ | | | | | | 3cb56f3 *: alias -h for --help (Daniel Cousens)
| * *: alias -h for --helpDaniel Cousens2015-10-221-1/+1
| |
* | Merge pull request #6235Wladimir J. van der Laan2015-10-201-5/+5
|\ \ | |/ |/| | | | | 55a8975 Chainparams: Translations: DRY: options and error strings (Jorge Timón) f3525e2 Chainparams: Replace CBaseChainParams::Network enum with string constants (suggested by Wladimir) (Jorge Timón)
| * Chainparams: Translations: DRY: options and error stringsJorge Timón2015-10-201-5/+5
| | | | | | | | Also remove SelectBaseParamsFromCommandLine and SelectParamsFromCommandLine
* | [Univalue] add univalue over subtreeJonas Schnelli2015-10-011-1/+1
| | | | | | | | similar to secp256k1 include and compile univalue over a subtree
* | rpc: Split option -rpctimeout into -rpcservertimeout and -rpcclienttimeoutWladimir J. van der Laan2015-09-211-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The two timeouts for the server and client, are essentially different: - In the case of the server it should be a lower value to avoid clients clogging up connection slots - In the case of the client it should be a high value to accomedate slow responses from the server, for example for slow queries or when the lock is contended Split the options into `-rpcservertimeout` and `-rpcclienttimeout` with respective defaults of 30 and 900.
* | Move windows socket init to utility functionWladimir J. van der Laan2015-09-031-0/+4
| |
* | evhttpd implementationWladimir J. van der Laan2015-09-031-40/+93
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - *Replace usage of boost::asio with [libevent2](http://libevent.org/)*. boost::asio is not part of C++11, so unlike other boost there is no forwards-compatibility reason to stick with it. Together with #4738 (convert json_spirit to UniValue), this rids Bitcoin Core of the worst offenders with regard to compile-time slowness. - *Replace spit-and-duct-tape http server with evhttp*. Front-end http handling is handled by libevent, a work queue (with configurable depth and parallelism) is used to handle application requests. - *Wrap HTTP request in C++ class*; this makes the application code mostly HTTP-server-neutral - *Refactor RPC to move all http-specific code to a separate file*. Theoreticaly this can allow building without HTTP server but with another RPC backend, e.g. Qt's debug console (currently not implemented) or future RPC mechanisms people may want to use. - *HTTP dispatch mechanism*; services (e.g., RPC, REST) register which URL paths they want to handle. By using a proven, high-performance asynchronous networking library (also used by Tor) and HTTP server, problems such as #5674, #5655, #344 should be avoided. What works? bitcoind, bitcoin-cli, bitcoin-qt. Unit tests and RPC/REST tests pass. The aim for now is everything but SSL support. Configuration options: - `-rpcthreads`: repurposed as "number of work handler threads". Still defaults to 4. - `-rpcworkqueue`: maximum depth of work queue. When this is reached, new requests will return a 500 Internal Error. - `-rpctimeout`: inactivity time, in seconds, after which to disconnect a client. - `-debug=http`: low-level http activity logging
* rpc: Implement random-cookie based authenticationWladimir J. van der Laan2015-07-131-8/+16
| | | | | | | | | | | | | | | When no `-rpcpassword` is specified, use a special 'cookie' file for authentication. This file is generated with random content when the daemon starts, and deleted when it exits. Read access to this file controls who can access through RPC. By default this file is stored in the data directory but it be overriden with `-rpccookiefile`. This is similar to Tor CookieAuthentication: see https://www.torproject.org/docs/tor-manual.html.en Alternative to #6258. Like that pull, this allows running bitcoind without any manual configuration. However, daemons should ideally never write to their configuration files, so I prefer this solution.
* [bitcoin-cli] improve error outputJonas Schnelli2015-07-071-0/+9
|
* Remove JSON Spirit wrapper, remove JSON Spirit leftoversJonas Schnelli2015-06-041-6/+9
| | | | | | - implement find_value() function for UniValue - replace all Array/Value/Object types with UniValues, remove JSON Spirit to UniValue wrapper - remove JSON Spirit sources
* remove JSON Spirit UniValue wrapperJonas Schnelli2015-06-041-5/+4
|
* extend conversion to UniValueJonas Schnelli2015-06-041-1/+1
|
* Convert tree to using univalue. Eliminate all json_spirit uses.Jeff Garzik2015-06-041-11/+9
|
* Separate CTranslationInterface from CClientUIInterfaceJorge Timón2015-04-161-2/+0
|
* Help messages correctly formatted (79 chars)Luca Venturini2015-03-101-15/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | Help messages are formatted programmatically with FormatParagraph in order not to break existing strings in Transifex. The new format works even if the translation of the strings modifies the lenght of the message. Sqashed 6 commits in a single one. Help messages correctly formatted for SVGA text mode (132 chars) Help messages are formatted programmatically with FormatParagraph in order not to break existing strings in Transifex. The new format should work even if the translation of the strings modifies the lenght of the message. Fix - syntax error Correct formatting for 79 chars Correctly based on C++ functions Removed spare spaces from option strings Fix - syntax error
* namespace: remove boost namespace pollutionCory Fields2015-01-021-8/+6
|
* Added "Core" to copyright headerssandakersmann2014-12-191-1/+1
| | | | | Github-Pull: #5494 Rebased-From: 15de949bb9277e442302bdd8dee299a8d6deee60
* Merge pull request #5470Wladimir J. van der Laan2014-12-191-1/+1
|\ | | | | | | 78253fc Remove references to X11 licence (Michael Ford)
| * Remove references to X11 licenceMichael Ford2014-12-161-1/+1
| |
* | make all catch() arguments constPhilip Kaufmann2014-12-171-6/+6
|/ | | | | | | - I saw this on http://en.cppreference.com/w/cpp/language/try_catch and thought it would be a good idea - also unify used format to better be able to search for exception uses in our codebase
* Disable SSLv3 (in favor of TLS) for the RPC client and server.Gregory Maxwell2014-12-061-1/+1
| | | | | | | | | | | | | | TLS is subject to downgrade attacks when SSLv3 is available, and SSLv3 has vulnerabilities. The popular solution is to disable SSLv3. On the web this breaks some tiny number of very old clients. While Bitcoin RPC shouldn't be exposed to the open Internet, it also shouldn't be exposed to really old SSL implementations, so it shouldn't be a major issue for us to disable SSLv3. There is more information on the downgrade attacks and disabling SSLv3 at https://disablessl3.com/ .
* Process help and version arguments before datadir.Pavel Janík2014-11-221-14/+14
|
* Reduce bitcoin-cli dependenciesPieter Wuille2014-11-051-1/+0
|
* Add "warmup mode" for RPC server.Daniel Kraft2014-11-041-30/+55
| | | | | | | | | | | | Start the RPC server before doing all the (expensive) startup initialisations like loading the block index. Until the node is ready, return all calls immediately with a new error signalling "in warmup" with an appropriate status message (similar to the init message). This is useful for RPC clients to know that the server is there (e. g., they don't have to start it) but not yet available. It is used in Namecoin and Huntercoin already for some time, and there exists a UI hooked onto the RPC interface that actively uses this to its advantage.
* Separate protocol versioning from clientversionCory Fields2014-10-291-1/+1
|
* Parameterise command line option defaults, so translations are independent ↵Luke Dashjr2014-10-111-3/+3
| | | | of them
* header include cleanupPhilip Kaufmann2014-09-141-2/+2
| | | | - ensures alphabetical ordering for includes etc. in source file headers
* 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.
* Move `*Version()` functions to version.h/cppWladimir J. van der Laan2014-08-261-0/+1
|
* Remove size limit in RPC client, keep it in serverWladimir J. van der Laan2014-08-061-1/+1
| | | | | | | | | | The size limit makes a lot of sense for the server, as it never has to accept very large data. The client, however, can request arbitrary amounts of data with `listtransactions` on a large wallet. Fixes #4604.
* bitcoin-cli, rpcrawtransaction: harmonize "{" stylingJeff Garzik2014-07-291-21/+10
|
* Move ui_interface to bitcoin_server.aWladimir J. van der Laan2014-07-071-1/+2
| | | | | There is no need for it in the utility libraries or tools. Put it in init.cpp, and in the tests separately (as they can't link init).
* Remove unnecessary dependencies for bitcoin-cliWladimir J. van der Laan2014-06-251-5/+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.
* Remove cli functionality from bitcoindWladimir J. van der Laan2014-06-151-1/+157
| | | | | | | | | | | | As it says on the tin. It was deprecated in version 0.9, and at some point it should be removed. Removes the dependency of bitcoind on libbitcoin-cli.a. Move some functions that used to be shared but are now only used in bitcoin-cli.cpp to that file. After this change, an error is printed (and exit code 1 is returned) when the user tries to send RPC commands using bitcoind.
* bitcoin-cli, rpcclient: prefer EXIT_FAILURE cstdlib constantJeff Garzik2014-06-151-4/+4
| | | | | | | A more complex construction via abs() yields the same end result. Rebased-From: 34ff109 Rebased-By: Wladimir J. van der Laan <[email protected]>
* Add `-version` option to get just the versionWladimir J. van der Laan2014-06-111-8/+10
| | | | | | | | | Adds a `-version` or `--version` option to print just the version of the program for bitcoind, bitcoin-cli and bitcoin-qt. Also make it that `-help` can be used to display the help (as well as existing `--help`). Up to now, `-help` was the only option that didn't work with either one or two dashes.
* Get rid of TestNet()jtimon2014-06-041-1/+1
|
* SetupEnvironment() - clean commitStuart Cardall2014-05-131-0/+2
|
* Show error message if ReadConfigFile failsWladimir J. van der Laan2014-04-071-1/+6
| | | | | | | A runaway exception was raised if ReadConfigFile fails (usually due to a parse error in bitcoin.conf). Show an error message instead. Fixes #4013.