aboutsummaryrefslogtreecommitdiff
path: root/src/bitcoind.cpp
AgeCommit message (Collapse)Author
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-11-30Merge #9010: Split up AppInit2 into multiple phases, daemonize after datadir ↵Pieter Wuille
lock errors deec83f init: Get rid of fServer flag (Wladimir J. van der Laan) 16ca0bf init: Try to aquire datadir lock before and after daemonization (Wladimir J. van der Laan) 0cc8b6b init: Split up AppInit2 into multiple phases (Wladimir J. van der Laan)
2016-11-29init: Split up AppInit2 into multiple phasesWladimir J. van der Laan
This allows doing some of the steps before e.g. daemonization and some fater.
2016-11-07Every main()/exit() should return/use one of EXIT_ codes instead of magic ↵UdjinM6
numbers
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-10-01Globals: Decouple GetConfigFile and ReadConfigFile from global mapArgsJorge Timón
2016-09-26bitcoind: Daemonize using daemon(3)Matthew King
Simplified version of #8278. Assumes that every OS that (a) is supported by Bitcoin Core (b) supports daemonization has the `daemon()` function in its C library. - Removes the fallback path for operating systems that support daemonization but not `daemon()`. This prevents never-exercised code from ending up in the repository (see discussion here: https://github.com/bitcoin/bitcoin/pull/8278#issuecomment-242704745). - Removes the windows-specific path. Windows doesn't support `daemon()`, so it don't support daemonization there, automatically. Original code by Matthew King, adapted by Wladimir van der Laan.
2016-09-04trivial: remove unnecessary variable fDaemonmruddy
2016-02-03Merge branch 'master' into single_prodnameLuke Dashjr
2016-02-03When/if the copyright line does not mention Bitcoin Core developers, add a ↵Luke Dashjr
second line to copyrights in -version, About dialog, and splash screen
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-11-27Initialize logging before we do parameter interactionJonas Schnelli
2015-11-27Refactor parameter interaction, call it before AppInit2()Jonas Schnelli
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-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-23Includes: Cleanup around net main and walletJorge Timón
-Move from .h to .cpp: in main, net and wallet -Remove unnecessary #include "main.h" -Cleanup some wallet files includes
2015-07-23TRIVIAL: Missing includesJorge Timón
2015-05-14Create a scheduler thread for lightweight tasksGavin Andresen
2015-04-30Merge pull request #6022Wladimir J. van der Laan
b74dcb3 Separate CTranslationInterface from CClientUIInterface (Jorge Timón)
2015-04-20 Use https link to bitcoin.org in Doxygen introMichael Ford
2015-04-16Separate CTranslationInterface from CClientUIInterfaceJorge Timón
2015-01-19Get rid of DetectShutdownThreadWladimir J. van der Laan
The main thread spends time waiting for the DetectShutdownThread. So why not just run this waiting loop function in the main thread? One thread-stack less saves 4MB of virtual memory on 32-bit, and 8MB on 64-bit.
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-11-22Process help and version arguments before datadir.Pavel Janík
2014-10-29Separate protocol versioning from clientversionCory Fields
2014-09-20Also create pid file in non-daemon modeWladimir J. van der Laan
Always make a pid file, not only when `-daemon` specified. This is useful for troubleshooting, for attaching debuggers and loggers and such. - Write the pid file only after the datadir lock was acquired - Don't create or remove a pid file on WIN32, and also don't show the option
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-06-15Remove cli functionality from bitcoindWladimir J. van der Laan
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.
2014-06-12Add 'about' information to `-version` outputWladimir J. van der Laan
Adds a copyright and attribution message to the `-version` output (the same as shown in the About dialog in the GUI). Move the message to a function LicenseInfo in init.cpp.
2014-06-11Add `-version` option to get just the versionWladimir J. van der Laan
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.
2014-06-04Get rid of TestNet()jtimon
2014-05-20Remove fDaemon flag checking on return from main(), which is useless and ↵Huang Le
looks really strange.
2014-05-13SetupEnvironment() - clean commitStuart Cardall
2014-04-07Show error message if ReadConfigFile failsWladimir J. van der Laan
A runaway exception was raised if ReadConfigFile fails (usually due to a parse error in bitcoin.conf). Show an error message instead. Fixes #4013.
2014-03-31Use the new name Bitcoin Core Daemon instead of Bitcoin serverpaveljanik
Rebased-By: Wladimir J. van der Laan <laanwj@gmail.com> Rebased-From-Github-Pull: #3801
2013-12-20Allow `-noserver` with bitcoindWladimir J. van der Laan
Allow running bitcoind without server. - Default to -server mode (of course) for bitcoind with SoftSetBoolArg - Remove fForceServer argument from AppInit2 - Move fDaemon to a static variable in bitcoind
2013-12-13Rebrand to `Bitcoin Core`Wladimir J. van der Laan
Only messages for now, executable names and other file names can be changed later if necessary and safe. Do not do an all-sweeping change. Some occurences of Bitcoin-Qt need to be kept: - Applicationname: this is used to determine the registry entry names, we don't want to lose settings over a silly name change. - Where it refers to the executable name instead of the product name.
2013-12-03bitcoin-cli: remove unneeded dependencies (only code movement)Wladimir J. van der Laan
Remove unnecessary dependencies for bitcoin-cli (leveldb, berkelydb, wallet, RPC server) Build system changes: - split libbitcoin.a into libbitcoin_common.a, libbitcoin_server.a and libbitcoin_cli.a Code changes (movement only): - split up HelpMessage into HelpMessage in init.cpp and HelpMessageCli in rpcclient.cpp - move uiInterface from init.cpp to util.cpp