aboutsummaryrefslogtreecommitdiff
path: root/src/bitcoin-cli.cpp
AgeCommit message (Collapse)Author
2017-05-03Chainparams: Use a regular factory for creating chainparamsJorge Timón
2017-04-03Replace uses of boost::filesystem with fsWladimir J. van der Laan
Step two in abstracting away boost::filesystem. To repeat this, simply run: ``` git ls-files \*.cpp \*.h | xargs sed -i 's/boost::filesystem/fs/g' ```
2017-04-03Replace includes of boost/filesystem.h with fs.hWladimir J. van der Laan
This is step one in abstracting the use of boost::filesystem.
2017-03-02Docs: add details to -rpcclienttimeout docIan Kelling
2017-01-10rpc: Named argument support for bitcoin-cliWladimir J. van der Laan
Usage e.g.: $ src/bitcoin-cli -testnet -named echo arg0="dfdf" [ "dfdf" ] Argument conversion also works, for arguments thus flagged in the table in `src/rpc/client.cpp`. $ src/bitcoin-cli -testnet -named echojson arg0="[1,2,3]" [ [ 1, 2, 3 ] ] Unknown parameter (detected server-side): $ src/bitcoin-cli -testnet -named getinfo arg0="dfdf" error code: -8 error message: Unknown named parameter arg0
2017-01-05Merge #9387: [Refactor] RAII of libevent stuff using unique ptrs with deletersWladimir J. van der Laan
05a55a6 Added EVENT_CFLAGS to test makefile to explicitly include libevent headers. (Karl-Johan Alm) 280a559 Added some simple tests for the RAII-style events. (Karl-Johan Alm) 7f7f102 Switched bitcoin-cli.cpp to use RAII unique pointers with deleters. (Karl-Johan Alm) e5534d2 Added std::unique_ptr<> wrappers with deleters for libevent modules. (Karl-Johan Alm)
2016-12-31Increment MIT Licence copyright header year on files modified in 2016isle2983
Edited via: $ contrib/devtools/copyright_header.py update .
2016-12-24Un-expose mapArgs from utils.hMatt Corallo
2016-12-23Introduce (and use) an IsArgSet accessor methodMatt Corallo
2016-12-23Remove arguments to ParseConfigFileMatt Corallo
2016-12-20Switched bitcoin-cli.cpp to use RAII unique pointers with deleters.Karl-Johan Alm
2016-12-02bitcoin-cli: Make error message less confusingWladimir J. van der Laan
Sorry for the churn on this, but the current message (introduced in #9073) isn't acceptable: $ src/bitcoin-cli getinfo rpc: couldn't connect to server (make sure server is running and you are connecting to the correct RPC port: -1 unknown) Putting the error code after the words "RPC port" made me wonder whether there was a port configuration issue. This changes it to: $ src/bitcoin-cli getinfo error: couldn't connect to server: unknown (code -1) (make sure server is running and you are connecting to the correct RPC port)
2016-11-25Removed using namespace std from bitcoin-cli/-tx and added std:: in ↵Karl-Johan Alm
appropriate places.
2016-11-08Merge #9067: Fix exit codesWladimir J. van der Laan
4441018 Every main()/exit() should return/use one of EXIT_ codes instead of magic numbers (UdjinM6) bd0de13 Fix exit codes: - `--help`, `--version` etc should exit with `0` i.e. no error ("not enough args" case should still trigger an error) - error reading config file should exit with `1` (UdjinM6)
2016-11-04Fix exit codes:UdjinM6
- `--help`, `--version` etc should exit with `0` i.e. no error ("not enough args" case should still trigger an error) - error reading config file should exit with `1` Slightly refactor AppInitRPC/AppInitRawTx to return standard exit codes (EXIT_FAILURE/EXIT_SUCCESS) or CONTINUE_EXECUTION (-1)
2016-11-03Add common failure cases for rpc server connection failureinstagibbs
2016-10-19rpc: Change JSONRPCRequest to JSONRPCRequestObjWladimir J. van der Laan
This is more consistent with `JSONRPCReplyObj`.
2016-10-01Globals: Decouple GetConfigFile and ReadConfigFile from global mapArgsJorge Timón
2016-09-21bitcoin-cli: More detailed error reportingWladimir J. van der Laan
Register a evhttp error handler to get a more detailed error message if the HTTP request fails.
2016-05-02bitcoin-cli.cpp: Use symbolic constant for exit codePuru
2016-02-24rpc: Input-from-stdin mode for bitcoin-cliWladimir J. van der Laan
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 ```
2016-02-03Merge branch 'master' into single_prodnameLuke Dashjr
2016-01-21move rpc* to rpc/Daniel Cousens
2015-12-14Unify package name to as few places as possible without major changesLuke Dashjr
2015-12-13Bump copyright headers to 2015MarcoFalke
2015-12-01Constrain rpcport default values to a single location in codeLuke Dashjr
2015-11-28Constrain constant values to a single location in codeLuke Dashjr
2015-10-27constify missing catch casesPhilip Kaufmann
- ensure all missing catch cases are constant where possible
2015-10-22Merge pull request #6846Wladimir J. van der Laan
3cb56f3 *: alias -h for --help (Daniel Cousens)
2015-10-22*: alias -h for --helpDaniel Cousens
2015-10-20Merge pull request #6235Wladimir J. van der Laan
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)
2015-10-20Chainparams: Translations: DRY: options and error stringsJorge Timón
Also remove SelectBaseParamsFromCommandLine and SelectParamsFromCommandLine
2015-10-01[Univalue] add univalue over subtreeJonas Schnelli
similar to secp256k1 include and compile univalue over a subtree
2015-09-21rpc: Split option -rpctimeout into -rpcservertimeout and -rpcclienttimeoutWladimir J. van der Laan
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.
2015-09-03Move windows socket init to utility functionWladimir J. van der Laan
2015-09-03evhttpd implementationWladimir J. van der Laan
- *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
2015-07-13rpc: Implement random-cookie based authenticationWladimir J. van der Laan
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.
2015-07-07[bitcoin-cli] improve error outputJonas Schnelli
2015-06-04Remove JSON Spirit wrapper, remove JSON Spirit leftoversJonas Schnelli
- implement find_value() function for UniValue - replace all Array/Value/Object types with UniValues, remove JSON Spirit to UniValue wrapper - remove JSON Spirit sources
2015-06-04remove JSON Spirit UniValue wrapperJonas Schnelli
2015-06-04extend conversion to UniValueJonas Schnelli
2015-06-04Convert tree to using univalue. Eliminate all json_spirit uses.Jeff Garzik
2015-04-16Separate CTranslationInterface from CClientUIInterfaceJorge Timón
2015-03-10Help messages correctly formatted (79 chars)Luca Venturini
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
2015-01-02namespace: remove boost namespace pollutionCory Fields
2014-12-19Added "Core" to copyright headerssandakersmann
Github-Pull: #5494 Rebased-From: 15de949bb9277e442302bdd8dee299a8d6deee60
2014-12-19Merge pull request #5470Wladimir J. van der Laan
78253fc Remove references to X11 licence (Michael Ford)
2014-12-17make all catch() arguments constPhilip Kaufmann
- 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
2014-12-16Remove references to X11 licenceMichael Ford
2014-12-06Disable SSLv3 (in favor of TLS) for the RPC client and server.Gregory Maxwell
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/ .