aboutsummaryrefslogtreecommitdiff
path: root/src/util.cpp
Commit message (Collapse)AuthorAgeFilesLines
* trivial: remove unnecessary variable fDaemonmruddy2016-09-041-1/+0
|
* [util] CopyrightHolders: Check for untranslated substitutionMarcoFalke2016-07-021-5/+4
| | | | Also, remove check which is always true
* Use std::atomic for fRequestShutdown and fReopenDebugLogPieter Wuille2016-06-011-1/+1
|
* Merge #8004: signal handling: fReopenDebugLog and fRequestShutdown should be ↵Wladimir J. van der Laan2016-05-121-1/+1
|\ | | | | | | | | | | 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/+1
| | | | | | | | | | | | | | | | 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-13/+0
|/ | | | | There's no clear reason ThreadMessageHandler should be low priority. Fixes #8010 (priority inversion).
* Removed call to `TryCreateDirectory` from `GetDefaultDataDir` in `src/util.cpp`.Alexander Regueiro2016-04-131-3/+1
| | | | | See https://github.com/bitcoin/bitcoin/issues/7845#issuecomment-207684728. Also refactored `GetDefaultDataDir` function to return path for Mac in one expression.
* Move GetTempPath() to testutil.Mustafa2016-03-111-22/+0
|
* Merge branch 'master' into single_prodnameLuke Dashjr2016-02-031-6/+8
|\
| * Bump copyright headers to 2015MarcoFalke2015-12-131-1/+1
| |
| * [trivial] Reuse translation and cleanup DEFAULT_* valuesMarcoFalke2015-11-281-2/+2
| | | | | | | | | | * DEFAULT_DISABLE_SAFEMODE = false * Use DEFAULT_* constants for extern bools
| * Constrain constant values to a single location in codeLuke Dashjr2015-11-281-3/+6
| |
| * util: Don't set strMiscWarning on every exceptionWladimir J. van der Laan2015-11-271-1/+0
| | | | | | | | | | Fixes #6809 - run-of-the-mill exceptions should not get into strMiscWarning (which is reported by `getinfo`).
* | When/if the copyright line does not mention Bitcoin Core developers, add a ↵Luke Dashjr2016-02-031-5/+9
| | | | | | | | second line to copyrights in -version, About dialog, and splash screen
* | Bugfix: Actually use _COPYRIGHT_HOLDERS_SUBSTITUTION everywhereLuke Dashjr2016-01-191-1/+1
| |
* | Set copyright holders displayed in notices separately from the package nameLuke Dashjr2015-12-221-0/+7
|/ | | | This helps avoid accidental removal of upstream copyright names
* Add option for microsecond precision in debug.logSuhas Daftuar2015-10-261-3/+8
|
* Changed logging to make -logtimestamps to work also for -printtoconsoleArne Brutschy2015-09-301-3/+4
|
* Move windows socket init to utility functionWladimir J. van der Laan2015-09-031-0/+12
|
* Fix argument parsing oddity with -noXWladimir J. van der Laan2015-07-271-28/+19
| | | | | | | | `bitcoind -X -noX` ends up, unintuitively, with `X` set. (for all boolean options X) This result is due to the odd two-pass processing of arguments. This patch fixes this oddity and simplifies the code at the same time.
* Merge pull request #6287Wladimir J. van der Laan2015-07-231-1/+1
|\ | | | | | | | | | | a794284 locking: add a quick example of GUARDED_BY (Cory Fields) 2b890dd locking: fix a few small issues uncovered by -Wthread-safety (Cory Fields) cd27bba locking: teach Clang's -Wthread-safety to cope with our scoped lock macros (Cory Fields)
| * locking: fix a few small issues uncovered by -Wthread-safetyCory Fields2015-06-161-1/+1
| | | | | | | | | | | | - rpcwallet: No need to lock twice here - openssl: Clang doesn't understand selective lock/unlock here. Ignore it. - CNode: Fix a legitimate (though very unlikely) locking bug.
* | Merge pull request #6149Wladimir J. van der Laan2015-07-221-26/+77
|\ \ | | | | | | | | | 27d7605 Buffer log messages and explicitly open logs (Adam Weiss)
| * | Buffer log messages and explicitly open logsAdam Weiss2015-07-061-26/+77
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | openssl: avoid config file load/raceCory Fields2015-07-141-0/+8
|/ /
* / Use real number of cores for default -par, ignore virtual coresWladimir J. van der Laan2015-07-011-0/+10
|/ | | | | | | | | | | | | | | | | 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
|
* 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)