aboutsummaryrefslogtreecommitdiff
path: root/src/bitcoind.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Initialize logging before we do parameter interactionJonas Schnelli2015-11-271-0/+2
|
* Refactor parameter interaction, call it before AppInit2()Jonas Schnelli2015-11-271-0/+1
|
* 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-2/+4
|\ \ | |/ |/| | | | | 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-2/+4
| | | | | | | | Also remove SelectBaseParamsFromCommandLine and SelectParamsFromCommandLine
* | evhttpd implementationWladimir J. van der Laan2015-09-031-2/+7
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - *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
* Includes: Cleanup around net main and walletJorge Timón2015-07-231-1/+0
| | | | | | -Move from .h to .cpp: in main, net and wallet -Remove unnecessary #include "main.h" -Cleanup some wallet files includes
* TRIVIAL: Missing includesJorge Timón2015-07-231-0/+1
|
* Create a scheduler thread for lightweight tasksGavin Andresen2015-05-141-1/+3
|
* Merge pull request #6022Wladimir J. van der Laan2015-04-301-1/+0
|\ | | | | | | b74dcb3 Separate CTranslationInterface from CClientUIInterface (Jorge Timón)
| * Separate CTranslationInterface from CClientUIInterfaceJorge Timón2015-04-161-1/+0
| |
* | Use https link to bitcoin.org in Doxygen introMichael Ford2015-04-201-1/+1
|/
* Get rid of DetectShutdownThreadWladimir J. van der Laan2015-01-191-13/+3
| | | | | | | | 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.
* 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-2/+2
|/ | | | | | | - 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
* Process help and version arguments before datadir.Pavel Janík2014-11-221-25/+28
|
* Separate protocol versioning from clientversionCory Fields2014-10-291-0/+1
|
* Also create pid file in non-daemon modeWladimir J. van der Laan2014-09-201-1/+0
| | | | | | | | | | 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
* 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.
* Remove cli functionality from bitcoindWladimir J. van der Laan2014-06-151-9/+3
| | | | | | | | | | | | 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.
* Add 'about' information to `-version` outputWladimir J. van der Laan2014-06-121-1/+5
| | | | | | | 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.
* Add `-version` option to get just the versionWladimir J. van der Laan2014-06-111-12/+15
| | | | | | | | | 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
|
* Remove fDaemon flag checking on return from main(), which is useless and ↵Huang Le2014-05-201-8/+1
| | | | looks really strange.
* SetupEnvironment() - clean commitStuart Cardall2014-05-131-0/+2
|
* Show error message if ReadConfigFile failsWladimir J. van der Laan2014-04-071-1/+7
| | | | | | | A runaway exception was raised if ReadConfigFile fails (usually due to a parse error in bitcoin.conf). Show an error message instead. Fixes #4013.
* Use the new name Bitcoin Core Daemon instead of Bitcoin serverpaveljanik2014-03-311-2/+2
| | | | | Rebased-By: Wladimir J. van der Laan <[email protected]> Rebased-From-Github-Pull: #3801
* Allow `-noserver` with bitcoindWladimir J. van der Laan2013-12-201-1/+6
| | | | | | | | 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
* Rebrand to `Bitcoin Core`Wladimir J. van der Laan2013-12-131-1/+1
| | | | | | | | | | | | 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.
* bitcoin-cli: remove unneeded dependencies (only code movement)Wladimir J. van der Laan2013-12-031-0/+1
| | | | | | | | | | | | | | 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
* Split up bitcoinrpc (code movement only)Wladimir J. van der Laan2013-11-271-1/+2
| | | | | | | | | | | | | | Split bitcoinrpc up into - rpcserver: bitcoind RPC server - rpcclient: bitcoin-cli RPC client - rpcprotocol: shared common HTTP/JSON-RPC protocol code One step towards making bitcoin-cli independent from the rest of the code, and thus a smaller executable that doesn't have to be linked against leveldb. This commit only does code movement, there are no functional changes.
* doc: small doxygen updateWladimir J. van der Laan2013-11-171-0/+16
| | | | | | I was merging change this every time before generation of the doxygen developer docs (https://dev.visucore.com/bitcoin/doxygen/) but there's no reason why it can't just be merged upstream.
* misc small changes to polish after include cleanupPhilip Kaufmann2013-11-111-2/+0
|
* Cleanup code using forward declarations.Brandon Dahler2013-11-101-4/+8
| | | | | | | | | 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.
* No more fHaveGUIWladimir J. van der Laan2013-11-041-2/+1
| | | | | | No more specific handling of GUI in bitcoin core. Replace the last usage of fHaveGUI with a fForceServer parameter on AppInit2.
* Break dependency of init on wallet.Pieter Wuille2013-10-261-0/+3
| | | | | | This required some code movement (what was CWalletTx::AcceptToMemoryPool doing in main?), and adding a few explicit includes that used to be implicit through init.h.
* Add separate bitcoin-rpc clientWladimir J. van der Laan2013-10-211-3/+4
| | | | | | | | This adds an executable `bitcoin-rpc` that only serves as a Bitcoin RPC client. The commit does not remove RPC functionality from the `bitcoind` yet, this functionality should be deprecated but is left for a later version to give users some time to switch.
* Bump Year Number to 2013super32013-10-201-1/+1
|
* make fCommandLine a local variable in AppInit()Philip Kaufmann2013-10-081-0/+1
|
* add missing Boost Thread join_all() call during shutdownPhilip Kaufmann2013-10-071-4/+13
| | | | | | - fixes #3037 by adding missing join_all() call and brings bitcoind shutdown code in line with Bitcoin-Qt shutdown code - added a comment for the if (!fRet) case
* update SelectParamsFromCommandLine() handling/orderPhilip Kaufmann2013-08-221-6/+7
| | | | | | | | | - move SelectParamsFromCommandLine() from init.cpp to bitcoin.cpp to allow to use TestNet() for Bitcoin-Qt instead of GetBoolArg("-testnet", false) - change order in bitcoind.cpp to match bitcoin.cpp functionality - hamonize error message strings for missing datadir and failing SelectParamsFromCommandLine() in bitcoin.cpp and bitcoind.cpp - use TestNet() call in splashscreen.cpp
* exclude CreatePidFile() function on WIN32 as it is unusedPhilip Kaufmann2013-07-241-1/+1
|
* Introduce a CChainParameters singleton class and regtest mode.Mike Hearn2013-06-191-0/+4
| | | | | | | | | | | | | The new class is accessed via the Params() method and holds most things that vary between main, test and regtest networks. The regtest mode has two purposes, one is to run the bitcoind/bitcoinj comparison tool which compares two separate implementations of the Bitcoin protocol looking for divergence. The other is that when run, you get a local node which can mine a single block instantly, which is highly convenient for testing apps during development as there's no need to wait 10 minutes for a block on the testnet.
* build: add global var for whether or not the gui is enabledCory Fields2013-06-041-0/+1
|
* build: split the non-gui startup routines into a new fileCory Fields2013-06-041-0/+136
This will allow each to have its own main(), meaning that we can build a common base client and simply link in the correct startup object to create the appropriate binary.