practicalswift
53a2ba351a
[util] Remove redundant call to get() on smart pointer (thread_specific_ptr)
8 years ago
Karl-Johan Alm
a57845c20e
Refactor: Remove using namespace <xxx> from util*
8 years ago
kirit93
40f11f8872
Fix for issue #9775 . Added check for open() returning a NULL pointer.
8 years ago
Alex Morcos
29fb311858
Increase minimum debug.log size to 10MB after shrink.
8 years ago
isle2983
27765b6403
Increment MIT Licence copyright header year on files modified in 2016
...
Edited via:
$ contrib/devtools/copyright_header.py update .
8 years ago
Matt Corallo
c2f61bebb1
Add a ForceSetArg method for testing
8 years ago
Matt Corallo
4e048142a5
Lock mapArgs/mapMultiArgs access in util
8 years ago
Matt Corallo
4cd373aea8
Un-expose mapArgs from utils.h
8 years ago
Matt Corallo
0cf86a6678
Introduce (and use) an IsArgSet accessor method
8 years ago
Matt Corallo
2b5f085ad1
Fix non-const mapMultiArgs[] access after init.
...
Swap mapMultiArgs for a const-reference to a _mapMultiArgs which is
only accessed in util.cpp
8 years ago
Matt Corallo
c8042a48f0
Remove arguments to ParseConfigFile
8 years ago
Karl-Johan Alm
8c1dbc5e9d
Refactor: Removed begin/end_ptr functions.
8 years ago
Gregory Maxwell
749be013f5
Move GetWarnings() into its own file.
8 years ago
Gregory Maxwell
e3ba0ef956
Eliminate data races for strMiscWarning and fLargeWork*Found.
...
This moves all access to these datastructures through accessor functions
and protects them with a lock.
8 years ago
Gregory Maxwell
c63198f1c7
Make QT runawayException call GetWarnings instead of directly access strMiscWarning.
...
This is a first step in avoiding racy accesses to strMiscWarning.
The change required moving GetWarnings and related globals to util.
8 years ago
Wladimir J. van der Laan
deec83fd2c
init: Get rid of fServer flag
...
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.
8 years ago
Matt Corallo
8b22efb6f7
Make fStartedNewLine an std::atomic_bool
...
While this doesnt really fix the race of adding timestamps
mid-logical-line, it avoids the undefined behavior of using a
bool in multiple threads.
8 years ago
Jorge Timón
3450c18a12
Globals: Decouple GetConfigFile and ReadConfigFile from global mapArgs
8 years ago
mruddy
ff2ed7a5bc
trivial: remove unnecessary variable fDaemon
8 years ago
Pavel Janík
7c069a7093
Do not shadow global variable
8 years ago
MarcoFalke
33336e1aac
[util] CopyrightHolders: Check for untranslated substitution
...
Also, remove check which is always true
9 years ago
Pieter Wuille
a886dbf8e7
Use std::atomic for fRequestShutdown and fReopenDebugLog
9 years ago
Chirag Davé
326231611b
fReopenDebugLog and fRequestShutdown should be type sig_atomic_t
...
This allows access as an atomic variable in the presence
of async interrupts.
See issue #7433 for more details
fixes : #7433
9 years ago
Kaz Wesley
e53e7c5473
don't run ThreadMessageHandler at lowered priority
...
There's no clear reason ThreadMessageHandler should be low priority.
Fixes #8010 (priority inversion).
9 years ago
Alexander Regueiro
41dbc4849e
Removed call to `TryCreateDirectory` from `GetDefaultDataDir` in `src/util.cpp`.
...
See https://github.com/bitcoin/bitcoin/issues/7845#issuecomment-207684728 .
Also refactored `GetDefaultDataDir` function to return path for Mac in one expression.
9 years ago
Mustafa
2fdaa25529
Move GetTempPath() to testutil.
9 years ago
Luke Dashjr
027fdb83b4
When/if the copyright line does not mention Bitcoin Core developers, add a second line to copyrights in -version, About dialog, and splash screen
9 years ago
Luke Dashjr
3cae14056a
Bugfix: Actually use _COPYRIGHT_HOLDERS_SUBSTITUTION everywhere
9 years ago
Luke Dashjr
917b1d03cf
Set copyright holders displayed in notices separately from the package name
...
This helps avoid accidental removal of upstream copyright names
9 years ago
MarcoFalke
fa24439ff3
Bump copyright headers to 2015
9 years ago
MarcoFalke
faf93f37fe
[trivial] Reuse translation and cleanup DEFAULT_* values
...
* DEFAULT_DISABLE_SAFEMODE = false
* Use DEFAULT_* constants for extern bools
9 years ago
Luke Dashjr
b966aa836a
Constrain constant values to a single location in code
9 years ago
Wladimir J. van der Laan
9b63758974
util: Don't set strMiscWarning on every exception
...
Fixes #6809 - run-of-the-mill exceptions should not get into
strMiscWarning (which is reported by `getinfo`).
9 years ago
Suhas Daftuar
7bbc7c314f
Add option for microsecond precision in debug.log
9 years ago
Arne Brutschy
58981d4f7d
Changed logging to make -logtimestamps to work also for -printtoconsole
9 years ago
Wladimir J. van der Laan
26c9b83677
Move windows socket init to utility function
9 years ago
Wladimir J. van der Laan
c38c49d0b7
Fix argument parsing oddity with -noX
...
`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.
10 years ago
Cory Fields
d4b1d5a8ba
openssl: avoid config file load/race
10 years ago
Adam Weiss
27d7605804
Buffer log messages and explicitly open logs
...
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.
10 years ago
Wladimir J. van der Laan
47162673c7
Use real number of cores for default -par, ignore virtual cores
...
To determine the default for `-par`, the number of script verification
threads, use [boost:🧵 :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.
10 years ago
Cory Fields
2b890dd424
locking: fix a few small issues uncovered by -Wthread-safety
...
- 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.
10 years ago
Philip Kaufmann
a9ac95c1bc
use const references where appropriate
10 years ago
lpescher
cb87386241
Make command line option to show all debugging consistent with similar options
...
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
10 years ago
Philip Kaufmann
5207f33f45
fix header include groups
10 years ago
Jonas Schnelli
3da7849007
[squashme] simplify SetupEnvironment() (by dexX7)
10 years ago
Jonas Schnelli
b3ffcdf916
don't imbue boost::filesystem::path with locale "C" on windows
...
fixes https://github.com/bitcoin/bitcoin/issues/6078
10 years ago
sinetek
7f386d2ff2
DragonFlyBSD thread renaming.
10 years ago
sinetek
cd558b421c
FreeBSD, OpenBSD thread renaming.
10 years ago
Jorge Timón
b74dcb3b4a
Separate CTranslationInterface from CClientUIInterface
10 years ago
dexX7
ba0fa0d9bc
Initialization: set fallback locale as environment variable
...
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.
10 years ago