aboutsummaryrefslogtreecommitdiff
path: root/src/util.cpp
AgeCommit message (Collapse)Author
2015-09-23Merge pull request #6703Wladimir J. van der Laan
45bfa13 PARTIAL: typofixes (found by misspell_fixer) (Veres Lajos) 21c406e add support for miniupnpc api version 14 (Pavel Vasin) 13bd5a7 rpc-tests: re-enable rpc-tests for Windows (Cory Fields) ccc4ad6 net: Set SO_REUSEADDR for Windows too (Cory Fields) 1f6772e add unit test for CNetAddr::GetGroup. (Alex Morcos) 13642a5 Fix masking of irrelevant bits in address groups. (Alex Morcos) 6b51b9b Replace boost::reverse_lock with our own. (Casey Rodarmor) 626c5e6 Make sure we re-acquire lock if a task throws (Casey Rodarmor) 4877053 Add missing files to files.md (fanquake) f171fee Handle leveldb::DestroyDB() errors on wipe failure (Adam Weiss) c5b89fe Fix race condition on test node shutdown (Casey Rodarmor) 4a37410 Handle no chain tip available in InvalidChainFound() (Ross Nicoll) f6d29a6 Use unique name for AlertNotify tempfile (Casey Rodarmor) e6adac7 Delay initial pruning until after wallet init (Adam Weiss) e0020d4 Make sure LogPrint strings are line-terminated (J Ross Nicoll) 7ff9d12 Make sure LogPrintf strings are line-terminated (Wladimir J. van der Laan) 5a39133 build: fix libressl detection (Cory Fields) f6355e6 Avoid leaking file descriptors in RegisterLoad (Casey Rodarmor) 60457d3 locking: fix a few small issues uncovered by -Wthread-safety (Cory Fields) a496e11 Remove bash test note from rpc-tests readme (fanquake) 49c6a64 tests: Remove old sh-based test framework (Wladimir J. van der Laan) a37567d Add autogen.sh to source tarball. (randy-waterhouse) 1f4d7cf travis: for travis generating an extra build (Cory Fields)
2015-09-22locking: fix a few small issues uncovered by -Wthread-safetyCory Fields
- 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.
2015-07-15openssl: avoid config file load/raceCory Fields
Github-Pull: #6438 Rebased-From: d4b1d5a8baf18e4c8d62846360c0c1c0c9331d70
2015-05-14fix header include groupsPhilip Kaufmann
2015-05-10[squashme] simplify SetupEnvironment() (by dexX7)Jonas Schnelli
2015-05-01don't imbue boost::filesystem::path with locale "C" on windowsJonas Schnelli
fixes https://github.com/bitcoin/bitcoin/issues/6078
2015-04-30Merge pull request #6022Wladimir J. van der Laan
b74dcb3 Separate CTranslationInterface from CClientUIInterface (Jorge Timón)
2015-04-29DragonFlyBSD thread renaming.sinetek
2015-04-21FreeBSD, OpenBSD thread renaming.sinetek
2015-04-16Separate CTranslationInterface from CClientUIInterfaceJorge Timón
2015-03-27Initialization: set fallback locale as environment variabledexX7
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.
2015-03-11Initialization: set Boost path locale in main threaddexX7
The path locale is lazy initialized and to avoid deinitialization errors in multithreading environments, it is set explicitly by the main thread.
2015-03-10Help messages correctly formatted (79 chars)Luca Venturini
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
2015-02-18Merge #5366: No longer check osx compatibility in RenameThreadWladimir J. van der Laan
850c570 No longer check osx compatibility in RenameThread (Michael Ford)
2014-12-19Added "Core" to copyright headerssandakersmann
Github-Pull: #5494 Rebased-From: 15de949bb9277e442302bdd8dee299a8d6deee60
2014-12-17make all catch() arguments constPhilip Kaufmann
- 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
2014-11-25No longer check osx compatibility in RenameThreadMichael Ford
10.5 support has been dropped for some time now.
2014-11-17Update comments in util to be doxygen compatibleMichael Ford
2014-11-01util.cpp comment correction21E14
2014-10-17Merge pull request #4804 from jtimon/chainparams3Wladimir J. van der Laan
Remove CBaseChainParams::NetworkID()
2014-10-11SQUASHME: fix "Reserve only one network specific cached path per session"jtimon
2014-09-25Fixing C4146 warningENikS
Rebased-By: Wladimir J. van der Laan <laanwj@gmail.com>
2014-09-21Reserve only one network specific cached path per sessionjtimon
2014-09-20Also create pid file in non-daemon modeWladimir J. van der Laan
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
2014-09-16Merge pull request #4825Pieter Wuille
8d657a6 Fixing compiler warning C4800: 'type' forcing value to bool 'true' or 'false' (ENikS)
2014-09-10Use explicit fflush() instead of setvbuf()Adam Weiss
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.
2014-09-06Fixing compiler warning C4800: 'type' forcing value to bool 'true' or 'false'ENikS
2014-08-26Split up util.cpp/hWladimir J. van der Laan
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.
2014-08-26Move `*Version()` functions to version.h/cppWladimir J. van der Laan
2014-08-26Move SetThreadPriority implementation to util.cpp instead of the headerWladimir J. van der Laan
Put the THREAD_* and PRIO_ constants in compat.h.
2014-08-12build: check for sys/prctl.h in the proper wayWladimir J. van der Laan
Use AC_CHECK_HEADERS to check for the header, and include it only if detected and the subsequent HAVE_SYS_PRCTL_H is set.
2014-08-12Fix thread name settingWladimir J. van der Laan
Because of a typo, thread names no longer appeared in the overview. This was broken in 51ed9ec.
2014-07-15Can't log to debug log before chain params initializedWladimir J. van der Laan
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`.
2014-07-09move rand functions from util to new random.h/.cppPhilip Kaufmann
2014-07-09add GetRandBytes() as wrapper for RAND_bytes()Philip Kaufmann
- 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
2014-07-07Merge pull request #4401Wladimir J. van der Laan
cf04d83 add OpenSSL RAND_cleanup() on OpenSSL shutdown (Philip Kaufmann)
2014-07-07Move ui_interface to bitcoin_server.aWladimir J. van der Laan
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).
2014-07-04Show nodeid instead of addresses (for anonymity) unless otherwise requested.R E Broadley
2014-06-30Merge pull request #4437Wladimir J. van der Laan
de79aaa Move non-trivial uint256.h methods to uint256.cpp (Pieter Wuille)
2014-06-28Move non-trivial uint256.h methods to uint256.cppPieter Wuille
2014-06-28Merge pull request #4398Wladimir J. van der Laan
86fe1b8 update coding.md to reflect changes by pull (Philip Kaufmann) e10dcf2 ensure clean and consistent "namespace" usage (Philip Kaufmann)
2014-06-26Merge pull request #4392Wladimir J. van der Laan
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)
2014-06-26Allocate more space if necessary in RandSeedAddPerfMonWladimir J. van der Laan
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)
2014-06-26add OpenSSL RAND_cleanup() on OpenSSL shutdownPhilip Kaufmann
- to securely erase the memory used by the PNRG - also rework 2 comments in OpenSSL init
2014-06-26ensure clean and consistent "namespace" usagePhilip Kaufmann
- remove some missplaced ; - ensure end of a namespace is clearly visible - use same formatting when using namespace
2014-06-25Remove unnecessary dependencies for bitcoin-cliWladimir J. van der Laan
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.
2014-06-25Move network-time related functions to timedata.cpp/hWladimir J. van der Laan
The network time-offset-mangement functions from util.cpp are moved to timedata.(cpp|h). This breaks the dependency of util on netbase.
2014-06-23Issue warning if collecting RandSeed data failedWladimir J. van der Laan
2014-06-23change "char pch[200000]" to "new char[200000]"daniel
2014-06-12Merge pull request #4193Wladimir J. van der Laan
71aaff3 Remove double-dash parameters from mapArgs (Kosta Zertsekel)