aboutsummaryrefslogtreecommitdiff
path: root/src/util.cpp
AgeCommit message (Collapse)Author
2012-08-21Restore OSX 10.5 compatibility (do not use pthread_setname_np)Gavin Andresen
2012-08-20Suppress output when running unit tests.Gavin Andresen
This does two things: 1) Now does not output to debug.log if -printtodebugger flag is passed 2) Unit tests set -printtodebugger so only test results are output to stdout Note that -printtodebugger only actually prints to the debugger on Windows.
2012-08-01Merge pull request #1632 from luke-jr/spellingJeff Garzik
Fix spelling and grammar errors
2012-08-01Bugfix: Correct English grammar regarding "'s"Luke Dashjr
2012-08-01Update Warning-strings to use a standard-formatPhilip Kaufmann
- ensure warnings always start with "Warning:" and that the first character after ":" is written uppercase - ensure the first sentence in warnings ends with an "!" - remove unneeded spaces from Warning-strings - add missing Warning-string translation - remove a "\n" and replace with untranslatable "<br><br>"
2012-07-21fix OpenSSL not written as proper noun in some commentsPhilip Kaufmann
2012-07-16Teach RenameThread to work on OSXGavin Andresen
2012-07-17Don't check for __linux__ specifically, check for PR_SET_NAME feature insteadGiel van Schijndel
Signed-off-by: Giel van Schijndel <me@mortis.eu>
2012-07-17Add support for renaming FreeBSD and OpenBSD threadsGiel van Schijndel
NOTE: This is currently disabled, until a developer with FreeBSD/OpenBSD can confirm that this works (without causing undefined behaviour preferrably). Signed-off-by: Giel van Schijndel <me@mortis.eu>
2012-07-17Give threads a recognisable name to aid in debuggingGiel van Schijndel
NOTE: These thread names are visible in gdb when using 'info threads'. Additionally both 'top' and 'ps' show these names *unless* told to display the command-line instead of task name. Signed-off-by: Giel van Schijndel <me@mortis.eu>
2012-06-29Fix a few typosfanquake
2012-06-23Merge pull request #1174 from sipa/torhsGregory Maxwell
Tor hidden service support
2012-06-23Node support for Tor hidden servicesPieter Wuille
This commit adds support for .onion addresses (mapped into the IPv6 by using OnionCat's range and encoding), and the ability to connect to them via a SOCKS5 proxy.
2012-06-22Introduce -debugnet option, thereby quieting some redundant debug messagesJeff Garzik
Prior to this change, each TX typically generated 3+ debug messages, askfor tx 8644cc97480ba1537214 0 sending getdata: tx 8644cc97480ba1537214 askfor tx 8644cc97480ba1537214 1339640761000000 askfor tx 8644cc97480ba1537214 1339640881000000 CTxMemPool::accept() : accepted 8644cc9748 (poolsz 6857) After this change, there is only one message for each valid TX received CTxMemPool::accept() : accepted 22a73c5d8c (poolsz 42) and two messages for each orphan tx received ERROR: FetchInputs() : 673dc195aa mempool Tx prev not found 1e439346fc stored orphan tx 673dc195aa (mapsz 19) The -debugnet option, or its superset -debug, will restore the full debug output.
2012-06-22Base32 encoding/decodingPieter Wuille
2012-05-25Testnet, Mark IIIGavin Andresen
2012-05-23Refactor: move runCommand() to util.cppJeff Garzik
2012-05-22Merge branch 'optimize'Gavin Andresen
2012-05-21Merge pull request #917 from mndrix/reopen-log-filePieter Wuille
Reopen log file on SIGHUP
2012-05-20Merge pull request #1354 from fanquake/masterPieter Wuille
Update Header Licenses
2012-05-20Make testcases build, prevent windows symbol collisionWladimir J. van der Laan
2012-05-20Convert UI interface to boost::signals2.Wladimir J. van der Laan
- Signals now go directly from the core to WalletModel/ClientModel. - WalletModel subscribes to signals on CWallet: Prepares for multi-wallet support, by no longer assuming an implicit global wallet. - Gets rid of noui.cpp, the few lines that were left are merged into init.cpp - Rename wxXXX message flags to MF_XXX, to make them UI indifferent. - ThreadSafeMessageBox no longer returns the value `4` which was never used, converted to void.
2012-05-20Merge pull request #1302 from laanwj/2012_05_utilstringsWladimir J. van der Laan
Get rid of snprintf (except one) with fixed buffers, shorten code
2012-05-18Reopen debug.log on SIGHUPMichael Hendricks
The best log rotation method formerly available was to configure logrotate with the copytruncate option. As described in the logrotate documentation, "there is a very small time slice between copying the file and truncating it, so some logging data might be lost". By sending SIGHUP to the server process, one can now reopen the debug log file without losing any data.
2012-05-18Serialize access to debug.log streamMichael Hendricks
Acquire an exclusive, advisory lock before sending output to debug.log and release it when we're done. This should avoid output from multiple threads being interspersed in the log file. We can't use CRITICAL_SECTION machinery for this because the debug log is written during startup and shutdown when that machinery is not available. (Thanks to Gavin for pointing out the CRITICAL_SECTION problems based on his earlier work in this area)
2012-05-18Use boost::thread locking instead of interprocessPieter Wuille
2012-05-18Update License in File HeadersFordy
I originally created a pull to replace the "COPYING" in crypter.cpp and crypter.h, but it turned out that COPYING was actually the correct file.
2012-05-17Refactor: GetRandHash() method for utilGavin Andresen
2012-05-17fix RenameOver() and FileCommit() functions, to not generate compilation errorsPhilip Kaufmann
2012-05-16Add new utility functions FileCommit(), RenameOver()Jeff Garzik
2012-05-14Get rid of snprintf (except one) with fixed buffers, shorten codeWladimir J. van der Laan
- Use strprintf or vstrprintf instead of snprintf
2012-05-13ensure that no double timestamps show up in the debug.log, by removing ↵Philip Kaufmann
manual timestamps from the source (now only -logtimestamps parameter adds timestamps to debug.log)
2012-05-13Move GetStartOnSystemStartup and SetStartOnSystemStartup to GUI codeWladimir J. van der Laan
2012-05-11Split synchronization mechanisms from util.{h,cpp}Pieter Wuille
2012-05-09Fix osx buildGavin Andresen
2012-05-09util.h/.ccp: modifiy some comments / rename MyGetSpecialFolderPath() -> ↵Philip Kaufmann
GetSpecialFolderPath(), set fCreate default to true and remove the fallback (not Win >= Vista compatible anyway) / remove namespace fs stuff where only used once / misc small changes'
2012-05-05Merge pull request #1187 from TheBlueMatt/win32_ieWladimir J. van der Laan
Update to require IE 5.1 as it is required to build on mingw64.
2012-05-02Update to require IE 5.1 as it is required on mingw64.Matt Corallo
We already require XP, this just fixes Mingw64 build.
2012-05-01fix compiler warning "suggest parentheses around assignment used as truthPhilip Kaufmann
value [-Wparentheses]" in util.cpp
2012-04-23Merge pull request #1140 from jgarzik/sign-compareJeff Garzik
Address many more sign comparison warnings
2012-04-23Add casts for unavoidable signed/unsigned comparisonsJeff Garzik
At these code sites, it is preferable to cast rather than change a variable's type.
2012-04-22Make GetDataDir return absolute pathsPieter Wuille
2012-04-18Fix bugs on 'unsigned char' platforms.Dwayne C. Litzenberger
In ISO C++, the signedness of 'char' is undefined. On some platforms (e.g. ARM), 'char' is an unsigned type, but some of the code relies on 'char' being signed (as it is on x86). This is indicated by compiler warnings like this: bignum.h: In constructor 'CBigNum::CBigNum(char)': bignum.h:81:59: warning: comparison is always true due to limited range of data type [-Wtype-limits] util.cpp: In function 'bool IsHex(const string&)': util.cpp:427:28: warning: comparison is always false due to limited range of data type [-Wtype-limits] In particular, IsHex erroneously returned true regardless of the input characters, as long as the length of the string was a positive multiple of 2. Note: For testing, it's possible using GCC to force char to be unsigned by adding the -funsigned-char parameter to xCXXFLAGS.
2012-04-18Fix phexdigits[255] is undefined.Dwayne C. Litzenberger
2012-04-17Further reduce header dependenciesPieter Wuille
This commit removes the dependency of serialize.h on PROTOCOL_VERSION, and makes this parameter required instead of implicit. This is much saner, as it makes the places where changing a version number can have an influence obvious.
2012-04-17Remove headers.hPieter Wuille
2012-04-17Remove unused and unreachable codeWladimir J. van der Laan
2012-04-15fix warnings: array subscript is of type 'char' [-Wchar-subscripts]Wladimir J. van der Laan
2012-04-15work around issue in boost::program_options that prevents from compiling in ↵Wladimir J. van der Laan
clang
2012-04-12Merge pull request #1087 from sipa/fix_1086Gavin Andresen
Fix #1086: add /testnet to passed datadir