aboutsummaryrefslogtreecommitdiff
path: root/src/util.h
Commit message (Collapse)AuthorAgeFilesLines
* really s/doge/dis/g this timeTomo Ueda2021-09-021-1/+1
|
* Introduce basic Dogecoin brandingRoss Nicoll2019-03-251-1/+1
|
* Merge #9417: Do not evaluate hidden LogPrint argumentsWladimir J. van der Laan2017-01-051-8/+9
|\ | | | | | | 407cdd6 Do not evaluate hidden LogPrint arguments (Pieter Wuille)
| * Do not evaluate hidden LogPrint argumentsPieter Wuille2016-12-231-8/+9
| |
* | Increment MIT Licence copyright header year on files modified in 2016isle29832016-12-311-1/+1
| | | | | | | | | | | | Edited via: $ contrib/devtools/copyright_header.py update .
* | Add a ForceSetArg method for testingMatt Corallo2016-12-271-0/+3
| |
* | Un-expose mapArgs from utils.hMatt Corallo2016-12-241-1/+0
| |
* | Introduce (and use) an IsArgSet accessor methodMatt Corallo2016-12-231-0/+8
| |
* | Fix non-const mapMultiArgs[] access after init.Matt Corallo2016-12-231-1/+1
| | | | | | | | | | Swap mapMultiArgs for a const-reference to a _mapMultiArgs which is only accessed in util.cpp
* | Remove arguments to ParseConfigFileMatt Corallo2016-12-231-1/+1
|/
* Move GetWarnings() into its own file.Gregory Maxwell2016-12-031-9/+0
|
* Eliminate data races for strMiscWarning and fLargeWork*Found.Gregory Maxwell2016-12-031-3/+5
| | | | | This moves all access to these datastructures through accessor functions and protects them with a lock.
* Make QT runawayException call GetWarnings instead of directly access ↵Gregory Maxwell2016-12-031-0/+7
| | | | | | | | strMiscWarning. This is a first step in avoiding racy accesses to strMiscWarning. The change required moving GetWarnings and related globals to util.
* init: Get rid of fServer flagWladimir J. van der Laan2016-11-291-1/+0
| | | | | | | There is no need to store this flag globally, the variable is only used inside the initialization process. Thanks to Alex Morcos for the idea.
* Globals: Decouple GetConfigFile and ReadConfigFile from global mapArgsJorge Timón2016-10-011-2/+2
|
* Do not shadow global variablePavel Janík2016-09-021-1/+1
|
* util: Remove zero-argument versions of LogPrint and errorWladimir J. van der Laan2016-06-271-22/+6
| | | | | | | | | Changes in tinyformat, recently imported from upstream have made the zero-argument versions of formatting functions unnecessary. Remove them. This is a slight semantic change: `%` characters in the zero-argument call are now regarded and need to be escaped. As for as I know, the only use of this is in `main.cpp`.
* Use std::atomic for fRequestShutdown and fReopenDebugLogPieter Wuille2016-06-011-5/+2
|
* Revert "Include signal.h for sig_atomic_t in WIN32"Pieter Wuille2016-06-011-0/+2
| | | | This reverts commit 88f14b999cb70f6c556633f2889e698a05305158.
* Include signal.h for sig_atomic_t in WIN32Pieter Wuille2016-05-271-2/+0
|
* Merge #8004: signal handling: fReopenDebugLog and fRequestShutdown should be ↵Wladimir J. van der Laan2016-05-121-1/+5
|\ | | | | | | | | | | type sig_atomic_t 3262316 fReopenDebugLog and fRequestShutdown should be type sig_atomic_t (Chirag Davé)
| * fReopenDebugLog and fRequestShutdown should be type sig_atomic_tChirag Davé2016-05-091-1/+5
| | | | | | | | | | | | | | | | This allows access as an atomic variable in the presence of async interrupts. See issue #7433 for more details fixes: #7433
* | don't run ThreadMessageHandler at lowered priorityKaz Wesley2016-05-051-1/+0
| | | | | | | | | | There's no clear reason ThreadMessageHandler should be low priority. Fixes #8010 (priority inversion).
* | util: switch LogPrint and error to variadic templatesWladimir J. van der Laan2016-05-041-25/+18
|/
* Move GetTempPath() to testutil.Mustafa2016-03-111-1/+0
|
* Merge branch 'master' into single_prodnameLuke Dashjr2016-02-031-1/+6
|\
| * Bump copyright headers to 2015MarcoFalke2015-12-131-1/+1
| |
| * [qt] Move GUI related HelpMessage() part downstreamMarcoFalke2015-11-281-4/+0
| |
| * [trivial] Reuse translation and cleanup DEFAULT_* valuesMarcoFalke2015-11-281-0/+2
| | | | | | | | | | * DEFAULT_DISABLE_SAFEMODE = false * Use DEFAULT_* constants for extern bools
| * Constrain constant values to a single location in codeLuke Dashjr2015-11-281-0/+7
| |
* | When/if the copyright line does not mention Bitcoin Core developers, add a ↵Luke Dashjr2016-02-031-1/+1
| | | | | | | | second line to copyrights in -version, About dialog, and splash screen
* | Set copyright holders displayed in notices separately from the package nameLuke Dashjr2015-12-221-0/+2
|/ | | | This helps avoid accidental removal of upstream copyright names
* Add option for microsecond precision in debug.logSuhas Daftuar2015-10-261-0/+3
|
* Move windows socket init to utility functionWladimir J. van der Laan2015-09-031-0/+1
|
* Buffer log messages and explicitly open logsAdam Weiss2015-07-061-0/+1
| | | | | | | | | | Prevents stomping on debug logs in datadirs that are locked by other instances and lost parameter interaction messages that can get wiped by ShrinkDebugFile(). The log is now opened explicitly and all emitted messages are buffered until this open occurs. The version message and log cut have also been moved to the earliest possible sensible location.
* Use real number of cores for default -par, ignore virtual coresWladimir J. van der Laan2015-07-011-0/+7
| | | | | | | | | | | | | | | | | To determine the default for `-par`, the number of script verification threads, use [boost::thread::physical_concurrency()](http://www.boost.org/doc/libs/1_58_0/doc/html/thread/thread_management.html#thread.thread_management.thread.physical_concurrency) which counts only physical cores, not virtual cores. Virtual cores are roughly a set of cached registers to avoid context switches while threading, they cannot actually perform work, so spawning a verification thread for them could even reduce efficiency and will put undue load on the system. Should fix issue #6358, as well as some other reported system overload issues, especially on Intel processors. The function was only introduced in boost 1.56, so provide a utility function `GetNumCores` to fall back for older Boost versions.
* use const references where appropriatePhilip Kaufmann2015-06-041-1/+1
|
* Use CScheduler for net's DumpAddressesGavin Andresen2015-05-141-37/+0
| | | | | Instead of starting Yet Another Thread to dump addresses, use CScheduler to do it.
* Separate CTranslationInterface from CClientUIInterfaceJorge Timón2015-04-161-0/+20
|
* Help messages correctly formatted (79 chars)Luca Venturini2015-03-101-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Reinitialize state in between individual unit tests.Pieter Wuille2015-03-031-0/+1
| | | | | This changes the TestingSetup fixture to be per-unit-test rather than global. Most tests don't need it, so it's only invoked in a few.
* Added "Core" to copyright headerssandakersmann2014-12-191-1/+1
| | | | | Github-Pull: #5494 Rebased-From: 15de949bb9277e442302bdd8dee299a8d6deee60
* make all catch() arguments constPhilip Kaufmann2014-12-171-5/+5
| | | | | | | - 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-15/+22
|
* amount.h: update license, add header end comment + rem from util.hPhilip Kaufmann2014-10-021-1/+0
|
* Use a typedef for monetary valuesMark Friedenbach2014-09-261-0/+1
|
* 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
* header include cleanupPhilip Kaufmann2014-09-141-1/+1
| | | | - ensures alphabetical ordering for includes etc. in source file headers
* add missing header end commentsPhilip Kaufmann2014-08-281-1/+1
| | | | | | - ensures a consistent usage in header files - also add a blank line after the copyright header where missing - also remove orphan new-lines at the end of some files
* Split up util.cpp/hWladimir J. van der Laan2014-08-261-170/+6
| | | | | | | | | | | | | | | | 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.