aboutsummaryrefslogtreecommitdiff
path: root/src/util.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* use const references where appropriatePhilip Kaufmann2015-06-041-1/+1
|
* Make command line option to show all debugging consistent with similar optionslpescher2015-05-191-0/+1
| | | | | | | Most people expect a value of 1 to enable all for command line arguments. However to do this for the -debug option you must type "-debug=". This has been changed to allow "-debug=1" as well as "-debug=" to enable all debug logging
* fix header include groupsPhilip Kaufmann2015-05-141-5/+5
|
* [squashme] simplify SetupEnvironment() (by dexX7)Jonas Schnelli2015-05-101-5/+5
|
* don't imbue boost::filesystem::path with locale "C" on windowsJonas Schnelli2015-05-011-0/+2
| | | | fixes https://github.com/bitcoin/bitcoin/issues/6078
* Merge pull request #6022Wladimir J. van der Laan2015-04-301-0/+1
|\ | | | | | | b74dcb3 Separate CTranslationInterface from CClientUIInterface (Jorge Timón)
| * Separate CTranslationInterface from CClientUIInterfaceJorge Timón2015-04-161-0/+1
| |
* | DragonFlyBSD thread renaming.sinetek2015-04-291-2/+2
| |
* | FreeBSD, OpenBSD thread renaming.sinetek2015-04-211-4/+6
|/
* Initialization: set fallback locale as environment variabledexX72015-03-271-3/+4
| | | | The scope of `std::locale::global` appears to be smaller than `setenv("LC_ALL", ...)` and insufficient to fix messed up locale settings for the whole application.
* Initialization: set Boost path locale in main threaddexX72015-03-111-9/+9
| | | | | The path locale is lazy initialized and to avoid deinitialization errors in multithreading environments, it is set explicitly by the main thread.
* Help messages correctly formatted (79 chars)Luca Venturini2015-03-101-0/+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
* Merge #5366: No longer check osx compatibility in RenameThreadWladimir J. van der Laan2015-02-181-6/+1
|\ | | | | | | 850c570 No longer check osx compatibility in RenameThread (Michael Ford)
| * No longer check osx compatibility in RenameThreadMichael Ford2014-11-251-6/+1
| | | | | | | | 10.5 support has been dropped for some time now.
* | Added "Core" to copyright headerssandakersmann2014-12-191-1/+1
| | | | | | | | | | Github-Pull: #5494 Rebased-From: 15de949bb9277e442302bdd8dee299a8d6deee60
* | make all catch() arguments constPhilip Kaufmann2014-12-171-5/+4
|/ | | | | | | - 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
* Update comments in util to be doxygen compatibleMichael Ford2014-11-171-19/+29
|
* util.cpp comment correction21E142014-11-011-2/+2
|
* Merge pull request #4804 from jtimon/chainparams3Wladimir J. van der Laan2014-10-171-7/+5
|\ | | | | Remove CBaseChainParams::NetworkID()
| * SQUASHME: fix "Reserve only one network specific cached path per session"jtimon2014-10-111-3/+5
| |
| * Reserve only one network specific cached path per sessionjtimon2014-09-211-7/+3
| |
* | Fixing C4146 warningENikS2014-09-251-1/+1
| | | | | | | | Rebased-By: Wladimir J. van der Laan <[email protected]>
* | Also create pid file in non-daemon modeWladimir J. van der Laan2014-09-201-1/+1
|/ | | | | | | | | | 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
* Merge pull request #4825Pieter Wuille2014-09-161-1/+1
|\ | | | | | | 8d657a6 Fixing compiler warning C4800: 'type' forcing value to bool 'true' or 'false' (ENikS)
| * Fixing compiler warning C4800: 'type' forcing value to bool 'true' or 'false'ENikS2014-09-061-1/+1
| |
* | Use explicit fflush() instead of setvbuf()Adam Weiss2014-09-101-0/+1
|/ | | | | | | Flushing after every line when printing to console is desirable when running with systemd but setvbuf() has slightly different semantics on Windows that causes warnings. Just do an explicit fflush() after each line print to console instead.
* Split up util.cpp/hWladimir J. van der Laan2014-08-261-547/+4
| | | | | | | | | | | | | | | | 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-25/+0
|
* Move SetThreadPriority implementation to util.cpp instead of the headerWladimir J. van der Laan2014-08-261-0/+13
| | | | Put the THREAD_* and PRIO_ constants in compat.h.
* build: check for sys/prctl.h in the proper wayWladimir J. van der Laan2014-08-121-1/+8
| | | | | Use AC_CHECK_HEADERS to check for the header, and include it only if detected and the subsequent HAVE_SYS_PRCTL_H is set.
* Fix thread name settingWladimir J. van der Laan2014-08-121-2/+2
| | | | | | Because of a typo, thread names no longer appeared in the overview. This was broken in 51ed9ec.
* Can't log to debug log before chain params initializedWladimir J. van der Laan2014-07-151-1/+1
| | | | | | | | | Add a function `AreBaseParamsConfigured` and use this to check before writing to the debug log. This avoids assertions when the application happens to log too early, which happens in the GUI. Messages logged before the base parameters are configured can be shown using `-printtoconsole`.
* move rand functions from util to new random.h/.cppPhilip Kaufmann2014-07-091-108/+1
|
* add GetRandBytes() as wrapper for RAND_bytes()Philip Kaufmann2014-07-091-13/+16
| | | | | | - add a small wrapper in util around RAND_bytes() and replace with GetRandBytes() in the code to log errors from calling RAND_bytes() - remove OpenSSL header rand.h where no longer needed
* Merge pull request #4401Wladimir J. van der Laan2014-07-071-2/+4
|\ | | | | | | cf04d83 add OpenSSL RAND_cleanup() on OpenSSL shutdown (Philip Kaufmann)
| * add OpenSSL RAND_cleanup() on OpenSSL shutdownPhilip Kaufmann2014-06-261-2/+4
| | | | | | | | | | - to securely erase the memory used by the PNRG - also rework 2 comments in OpenSSL init
* | Move ui_interface to bitcoin_server.aWladimir J. van der Laan2014-07-071-2/+0
| | | | | | | | | | 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).
* | Show nodeid instead of addresses (for anonymity) unless otherwise requested.R E Broadley2014-07-041-0/+1
| |
* | Merge pull request #4437Wladimir J. van der Laan2014-06-301-0/+5
|\ \ | | | | | | | | | de79aaa Move non-trivial uint256.h methods to uint256.cpp (Pieter Wuille)
| * | Move non-trivial uint256.h methods to uint256.cppPieter Wuille2014-06-281-0/+5
| | |
* | | Merge pull request #4398Wladimir J. van der Laan2014-06-281-1/+2
|\ \ \ | |/ / |/| | | | | | | | 86fe1b8 update coding.md to reflect changes by pull (Philip Kaufmann) e10dcf2 ensure clean and consistent "namespace" usage (Philip Kaufmann)
| * | ensure clean and consistent "namespace" usagePhilip Kaufmann2014-06-261-1/+2
| |/ | | | | | | | | | | - remove some missplaced ; - ensure end of a namespace is clearly visible - use same formatting when using namespace
* | Merge pull request #4392Wladimir J. van der Laan2014-06-261-11/+26
|\ \ | |/ |/| | | | | | | 8ae973c Allocate more space if necessary in RandSeedAddPerfMon (Wladimir J. van der Laan) be873f6 Issue warning if collecting RandSeed data failed (Wladimir J. van der Laan) fcb0a1b change "char pch[200000]" to "new char[200000]" (daniel)
| * Allocate more space if necessary in RandSeedAddPerfMonWladimir J. van der Laan2014-06-261-2/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | Currently we use a fixed buffer of 250000 bytes to request HKEY_PERFORMANCE_DATA. In many cases this is not enough, causing the entropy collection to be skipped. Use a loop that grows the buffer as specified in the RegQueryValueEx documentation: http://msdn.microsoft.com/en-us/library/windows/desktop/ms724911%28v=vs.85%29.aspx (as the size of the performance data can differ for every call, the normal solution of requesting the size then allocating that can't work)
| * Issue warning if collecting RandSeed data failedWladimir J. van der Laan2014-06-231-1/+8
| |
| * change "char pch[200000]" to "new char[200000]"daniel2014-06-231-10/+9
| |
* | Remove unnecessary dependencies for bitcoin-cliWladimir J. van der Laan2014-06-251-6/+6
| | | | | | | | | | | | | | | | | | 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.
* | Move network-time related functions to timedata.cpp/hWladimir J. van der Laan2014-06-251-77/+0
|/ | | | | The network time-offset-mangement functions from util.cpp are moved to timedata.(cpp|h). This breaks the dependency of util on netbase.
* Merge pull request #4193Wladimir J. van der Laan2014-06-121-12/+8
|\ | | | | | | 71aaff3 Remove double-dash parameters from mapArgs (Kosta Zertsekel)
| * Remove double-dash parameters from mapArgsKosta Zertsekel2014-06-041-12/+8
| | | | | | | | | | | | | | | | | | Should be merged after pull request #4281 ("Add `-version` option to get just the version #4281"), because is changed "--help" to "-help". Checked that grep of 'mapArgs.count("--' returned only three places that are fixed by pull request #4281.